Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 309479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:44:44+00:00 2026-05-12T07:44:44+00:00

I have a page in a site that contains an iframe with a form

  • 0

I have a page in a site that contains an iframe with a form in it. I can’t change this but I do have full control over all of the JS that runs in the parent page and the iframe’d page.

My problem is that when I have a form field focused in the iframe’d document, tabbing to the next field sends the cursor straight up to the address bar of the browser, not the next field in the form. Setting tabindexes on each of the fields doesn’t help.

The browser is treating the entire iframe itself as one of the elements in the page (as it should), but I’m wondering if there’s a way to capture the tab events and force focus to stay inside of the iframe and with its child elements.

Have any of you run into this issue before and have a way around it?

Not that it will help you, but the layout is something like:

+-------------------------------------------+
| Parent page                               |
|         +-------------------------------+ |
|  N      | iframe                        | |
|  a      |                               | |
|  v      | Has about 50 fields that I'd  | |
|  i      | like to be able to tab between| |
|  g      |                               | |
|  a      | But I can't! Help!            | |
|  t      |                               | |
|  i      +-------------------------------+ |
|  o                                        |
|  n                                        |
+-------------------------------------------+

One idea was to try and capture the keydown events in the iframe, check for tab or shift+tab and then refocus the iframe, but then there’s the problem of knowing which field I was on before losing focus. Is there a way to dynamically focus the next field using JS and the tabindex attribute on the form fields? Perhaps that’s where I venture next…

Update: perhaps there’s something even simpler that I’m missing. For example, the login box on http://www.studentloan.com is an iframe and I can tab between those fields just fine. Maybe something else in my JS is causing the problem.

Update 2: I tried loading just the iframe document in the browser as a standalone page and I still can’t tab. I think it’s something I’m doing in JS somewhere else that’s causing the document to lose focus. I’ll post my solution when I find it.

Update 3:

The problem is caused by the Ajax Control Tookit’s ModalPopupExtender. I’m using one as a loading message after calling a webservice. It gets hidden when the callback method is fired.

I can tab between the fields until the Modal popup is shown and hidden for the first time. After that, the form can never keep its focus. I’m investigating why and will post an answer if I can find out why.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:44:44+00:00Added an answer on May 12, 2026 at 7:44 am

    I had almost the same problem as you.
    After a lot of time looking for a solution I found this web where I could discover what was causing me this problem: the modalpopupextender.
    Once I knew what was the real problem, it was pretty easy find the solution. Here it is: http://forums.asp.net/t/1191142.aspx

    I hope it helps you to understand this problem as it did for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page P1 loading from site S1 which contains an iframe. That
I have a search page on my MVC site that contains a list of
I have a page that is included as an iframe in my site. I
I have a mvc web site that contains one non-mvc page (it is using
I have a <li> that contains an <a href> <li><a href=http://site.com>Page</a></li> I'd like to
I have a page with an iframe, and the iframe contains code that needs
i have a yii site that contains main layout. in this main layout file
I have a page with a large iframe that contains a majority of the
I have a site with a page that contains some tabs and when selecting
I have an iframe that contains some content from a site. I want the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.