> Ok, let me show what I'm trying to do, imagine that this is
> the HTML code rendered by struts:
> <form name="elementForm" action="/getElements.do">
> <input type="hidden" name="action" value="Create">
> </form>
> Now, when I try to change the value of
> ..action="/getElements.do".. using javascript ,
> document.elementForm.action = '/newGetElements.do', this
> refers to the field that has the Create value instead of the
> action element in the form tag (<form name="elementForm"
> action="/getElements.do">).
So you're trying to change the value of the "action" attribute of the
"<form...> tag? Then my first post was right: assign an id= attribute to the
"<form..>" tag (using the styleId attribute of the Struts <html:form...>
tag), then use document.getElementById() to find the form tag. So you have:
<form action="something.do" id="xxxx">
Which might come from the Struts tag:
<html:form action="something.do" styleId="xxxx">
Then your JavaScript would look like this:
document.getElementById("xxxx").action="somethingelse.do";
That can only assign a new value to the action attribute of the <form..>
tag, it can't possibly address the hidden text field.
--
Tim Slattery
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]