[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Frame/Script Problem
What is the instruction you are using to set the focus? If you post that it
might be helpful to see if the problem is there.
Also do note that the focus method is busted in most platforms. You can get
more consistent results by calling focus, then select. It goes like this:
parent.frame_name.document.formname.controlname.focus();
parent.frame_name.document.formname.controlname.select();
-- Gordon
http://gmccomb.com/javascript/
At 09:58 AM 3/18/96 -0500, you wrote:
>As a newcomer to Javascript, I am hoping someone can help me with the
>following problem:
>
>I have a web page with three frames; two of the frames ("f2" and "f3") refer
>to the same web document, which contains a form. "f2" displays the submit
>button, as well as some other information. When I click on the submit button
>in "f2", the form info in "f3" is run through a JS validation routine to
>check that all mandatory values have been filled in; if a field has not been
>filled in, focus is set back to the empty field.
>
>The problem is: How do I get the third frame "f3" to set focus to the empty
>field? Depending on what I try, the second frame "f2" sets focus to the
>empty field, or I get a JS error saying the field has no properties.
>
>Any assistance would be most appreciated!
>
>-John Meadows
>
>--------------------------------------------------------------------
>For help about the list, please send a message to 'majordomo@obscure.org'
>with the message body 'help'. To unsubscribe, send a message to
>'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
>List archives and pointer to FAQ: http://www.obscure.org/javascript/
>
>
-- Gordon
http://gmccomb.com/javascript/
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/