struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cedric Levieux" <>
Subject Re: struts and java script and jsp
Date Tue, 01 Feb 2005 10:22:48 GMT

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


----- Original Message ----- 
From: "Nadia Kunkov" <>
To: "Struts help (E-mail)" <>
Sent: Tuesday, January 25, 2005 5:20 PM
Subject: struts and java script and jsp


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
document.forms["logonForm"].elements["username"].type is null or not an

When I looked at the page source I saw the following javascript added:
<script language="javascript">
if (document.forms["logonForm"].elements["username"].type  != "hidden"

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:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message