Hehe.
I remember when I first encountered this. Took me ages to figure out why the
heck my form didnt work. I ended up chopping bits out of the form one at a
time till suddenly it worked, and seeing it was an input field named
'action' the penny dropped! lol.

Like Wendy says, the best way to deal with this issue is quite simple. Dont
stuff around trying to name a field 'action' - just call it something else.
(Ditto for any other fields whose names will cause them to shadow javascript
form properties).

-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 March 2004 03:35
To: Struts Users Mailing List
Subject: RE: people using action form field


> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> I know this is a javascript question but is related with struts.
> 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?

There is, and Tim gave you that answer.  I solved the problem by
changing the form property to 'userAction' which makes the whole thing
clearer.  Think about the next person who has to maintain your project--
if you leave it as 'action' at least document this issue clearly.  I
know I spent a while trying to figure it out!

--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management

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