August 1999
Intermediate to advanced
1488 pages
72h 53m
English
onFocus="command"
The onFocus event handler of an instance of a Submit object is fired when focus is set to that particular submit button. Care should be taken when using this event handler, because it is possible to get into an infinite loop when using the onBlur event handler or blur() method.
Listing 7.488 contains two text boxes and a submit button. The submit button has the Focus event intercepted within its tag. The second text box is used for a counter for the number of times the onFocus event handler is fired.
In the script, the event calls a function that assigns the first text box focus. The result of this is that when a user tries to ...
Read now
Unlock full access