.showmodaldialog and field focus
Hi
New to ASP and Javascript so be gentle if this is a stupid question.
I have an asp page that is used for user confirmation (ID/Password) that is called at various points in a web application based on an intranet.
The page contains two input fields, user id (defaulted to current user) and password and two buttons (accept and cancel)
I am trying to give focus to the password field on load and have a single line javascript function called "onload=" as
document.opcheck.txtPassword.focus();
The issue I am having in inconsistency with actually gaining focus in the password field.
Using my own machine as server and client I cannot get focus in the field. By dialing onto a customer site and running the exact same software, the focus in the password field on load is obtained. If the users on the site try they do not get the focus (This is the reason for testing and this thread).
The only difference I have noticed is that on my machine I do not get a status bar at the bottom of the dialog box but using the software on site I do (using the default for status).
Other testing involved adding a window.alert in the onload function before the ...focus line. If the alert is removed quickly then I do not get focus, if the alert remains for a few seconds then focus is obtained.
I cannot give a link etc to test as all the software/DB is intranet based although I have tried to supply as much information as possible. If there is any thing I have missed please let me know.
Any ideas or avenues of testing would be appreciated.
Thanks in advance
Darren
(IE 6 SP2, IIS 5.1, ASP)
|