It is: item

<html:text property="item" size="40" />

is:

<input type="text" name="item" size="40" value="">


-----Urspr�ngliche Nachricht-----
Von: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 3. Juni 2003 14:56
An: Struts Users Mailing List
Betreff: RE: JavaScript and text field


I would check the HTML source and see what the "Name" attribute for the
textfield you are trying to access is set to.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:53 AM
To: [EMAIL PROTECTED]
Subject: JavaScript and text field


Hi,

I have some problems to access a text field.

I have this JSP code:

<html:form action="criteria.do" method="post" onsubmit="javascript:check()">
<html:text property="item" size="40" />....

And want to access the value of the item field:

function check(){
        var inputvalue = document.all.item.value;
        alert(inputvalue);
        var inputvalue = document.forms[0].item.value;
        alert(inputvalue);
}

No of these variant runs. In an another application I have the 2 solution
and it works. Are there any depedencies between struts and JS?

Juraj

---------------------------------------------------------------------
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