IFrame is stealing focus from main page controls

D

DBxGlock

Howdy folks,

I have an asp.net webpage that has a table with 2 columns. In the left
column is an IFrame. In the right column is a bunch of user controls
including a textbox, some buttons, a grid, etc.

Here's the problem: when the user clicks a button, the url of the
IFrame is set in the codebehind. When the page loads, the body's
onload event fires a javascript function that sets focus to the
textbox. A few seconds later, the IFrame finishes loading and the
focus is stolen away from the textbox and given to the IFrame.

Does anybody know how to stop this from happening? The IFrame's URL is
a PDF so I can't execute any JavaScript when it loads.

Thanks,
Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top