struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rapsy <roshini.bha...@gmail.com>
Subject Submit a struts form using javascript
Date Tue, 15 Jul 2008 15:46:20 GMT


I am using struts 1.1 and having problem submitting first form from inside
the second form.
What happens when the first form is submitted from the second form using
javascript? Does it call the 'execute" method of first form?

For example:
Here is the code:
<form name='secondForm' method='post' action='secondForm.do'>

<input type="submit" name="method" value="Go"
onclick="javascript:document.forms['firstForm'].submit();" />
</form>

In the above code, "firstForm" is a struts form and it not getting
submitted. The values are getting lost.
The weird thing is works on my local machine but when I deploy on production
server it doesn't work. Any help is greatly appreciated.

Thank you!


-- 
View this message in context: http://www.nabble.com/Submit-a-struts-form-using-javascript-tp18468491p18468491.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message