> Then, where does it come up with "username"?

Could it be that you have "username" specified in validator.xml ?

H

On Tue, 1 Feb 2005 11:22:48 +0100, Cedric Levieux <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> You have this JavaScript code cause you ask into the <htm:form> tag the
> ability to focus on a form field.
> 
> But btw I don't understand why the javascript code didn't work :p
> 
> Regards,
> 
> Cedric
> ----- Original Message -----
> From: "Nadia Kunkov" <[EMAIL PROTECTED]>
> To: "Struts help (E-mail)" <user@struts.apache.org>
> Sent: Tuesday, January 25, 2005 5:20 PM
> Subject: struts and java script and jsp
> 
> Hi,
> 
> I'm not sure if this question is really about struts even though it occures
> in my struts application.  My apologies if this is a bit off topic.
> I have a jsp logon page with two input fields "userId' and "password"
> I of course have a corresponding ActionForm with the same attributes.
> When I open my Logon page in Mozilla I have no problem whatosever.
> When I open it in IE it's done with errors on page and  I have the following
> message:
> document.forms["logonForm"].elements["username"].type is null or not an
> object
> 
> When I looked at the page source I saw the following javascript added:
> <script language="javascript">
> <!--
> if (document.forms["logonForm"].elements["username"].type  != "hidden"
> document.forms["logonForm"].elements["username"].focus()
> //-->
> </script>
> 
> I'm wondering why this javascript is being added and does it have anything
> to do with struts?
> Also, could the problem be that it refers to element["username"] that does
> not exist in my jsp, since I have "userId"?
> Then, where does it come up with "username"?
> How do I get around it?
> Should I change my form to have "username"?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to