You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mucus snot <mu...@virgin.net> on 2003/10/29 23:36:10 UTC
form:html name attribute
Hi,
I want to use the <html:form name="searchform" action=...> with the name
attribute, so that I can post the form other than using the submit form
using javascript e.g.
function sgenrePost(sgenreid){
document.forms['searchform'].sgenreid.value = sgenreid;
document.forms['searchform'].submit();
}
Unfortunately, the jsp won't compile without a accompanying type attribute,
which as I understand it, has to be set to the name of the form/action bean
(I could be wrong about this).
This has the unfortunate side effect of
overwriting/destroying/reinitialising the original form bean on the request
page, so that the form properties do not get reset to the what they were
set with when the form was submitted.
Has anyone had this problem before?
Do I have to abandon the javascript posting, and just use url encoding?
Thanks, al