document.forms[0].elements.focus() is not working in IE 7.0+ and FF 3.0
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hello Friends,
I am trying the following code since long time .As It prompts and runs fine in IE 6.0 but in all the upper versions it fails .As cursor moves to next textbox rather than the same .
I am using that code in my JSP as
Please help me I tried lots of things but failed
!!!
I am trying the following code since long time .As It prompts and runs fine in IE 6.0 but in all the upper versions it fails .As cursor moves to next textbox rather than the same .
I am using that code in my JSP as
Please help me I tried lots of things but failed
!!!God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
OCPJP6
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Do the id.focus() after the alert statement
You also probably want to use onblur
Eric
You also probably want to use onblur
Eric
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Apart from this problem, using document.forms[x] instead of document.formname or document.getElementById(formid) is a bad practice and receipt for trouble.
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Indeed. Using names instead of ids for DOM navigation is a quaint and old-fashioned practice that should be avoided.
Fidel Edwards
Ranch Hand
Posts: 244
posted 16 years ago
Thanks For Early Reply! But I tried lots of things but failed .As all the time cursor moves to next textbox.It is working fine with IE6.0 but for latest browser it prompts but on clicking OK button it moves to next textbox without further prompting.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Bauke Scholtz wrote:Apart from this problem, using document.forms[x] instead of document.formname or document.getElementById(formid) is a bad practice and receipt for trouble.
Thanks For Early Reply! But I tried lots of things but failed .As all the time cursor moves to next textbox.It is working fine with IE6.0 but for latest browser it prompts but on clicking OK button it moves to next textbox without further prompting.
God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
OCPJP6
Bauke Scholtz
Ranch Hand
Posts: 2458
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Someone said something about onblur.
Eric Pascarello
author
Posts: 15385
6
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
onchange is not fired on every keystroke. It is fired when focus is removed from the element and the data has changed.
Eric
Eric
Fidel Edwards
Ranch Hand
Posts: 244
posted 16 years ago
Thanks Eric !! But It is Still not running .
I am sending my javascript code which is in js file
I am calling this function as
It is not working in IE 7.0 and FF 3.0 !!
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Eric Pascarello wrote:onchange is not fired on every keystroke. It is fired when focus is removed from the element and the data has changed.
Eric
Thanks Eric !! But It is Still not running .
I am sending my javascript code which is in js file
I am calling this function as
It is not working in IE 7.0 and FF 3.0 !!
God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
OCPJP6
Fidel Edwards
Ranch Hand
Posts: 244
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Any One can solve this problem ??
God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
OCPJP6
| Whip out those weird instruments of science and probe away! I think it's a tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |










