Hi Barbara, I just ran a quick test with IE 5.5, and it seems that your code works fine for me (with the script tag inside the form).
Along a different vein, are you sure your input name is "my_text"? Is it maybe "my_text " or " my_text" instead? If you do have extra whitespace in the input name, IE will consider that a different name, so that might be why you get the error message you see. Anyway, shot in the dark, but hope it might help! Harry -----Original Message----- From: Stan Dyck [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 11:01 AM To: [EMAIL PROTECTED] Subject: Re: issues with javascript Try rearranging the code so the the <script> element is written after the </form> tag. I suspect that the javascript interpreter cannot resolve "my_form" because it has not been completely written to the browser yet. hope this helps, StanD. ----- Original Message ----- From: "Barbara Post" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 11, 2002 8:53 AM Subject: issues with javascript > I know this is a bit offtopic but maybe it is due to cocoon ? I hope not ! I > posted in javascript newsgroup too... I admit that javascript is not > complicated but I often have troubles with it... > > "I generate a page with xml and xsl : > > At a moment I have an input field, let's say "my_text", in "my_form" form > (no frames, one form in the body). > > So I have a template that writes the html code for the input field and right > below the javascript tag to focus on it : > > <script language="javascript">document.my_form.my_text.focus()</script> > > IE 5.5 says that document.my_form.my_text is null or not an object. > > At the moment the browser displays this javascript tag, the html generation > process hasn't produced the final </form> tag. May this be an issue ? Any > other ideas of what could be wrong ?" > > Thanks, > > Barbara > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>