But I cannot set the id element in the <html:form> tag.

Thanks

-----Mensaje original-----
De: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Enviado el: Martes, 09 de Marzo de 2004 04:07 p.m.
Para: 'Struts Users Mailing List'
Asunto: RE: people using action form field

> If you use a field called "action" in the form, how can you 
> change the form action with javascript. When I try to set the 
> document.form.action it tries to set the field instead of the 
> action for the form. Is there any other way to change the 
> action for the form?

Give the form an "id" attribute:

<form action="whatever" id="formname">

Now you can use the ID attribute to find the form:

document.getElementById("formname").action="newaction.do";

--
Tim Slattery
[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