Thanks for all the input on this one!
alas the form.submit(), causes a reload of the page :(
thanks,
Ulf> Date: Wed, 11 Feb 2009 08:37:06 -0500> From: mgor...@shadowtv.biz> To:
user@struts.apache.org> Subject: Re: submitting a form without a submit button
ajax-style> > ulf n wrote:> > the Form:> >> > <s:form theme="ajax"
action="MyAction" id="myStatusForm">> > <s:hidden name="statusdate"/>> >
<s:checkbox theme="ajax" name="status" value="status"
onclick="javascript:someHowSubmitTheFormWithoutReload();"></s:checkbox>> >
</s:form> > > > the modified form:> > <s:form theme="ajax" action="MyAction"
id="myStatusForm">> <s:hidden name="statusdate"/>> <s:checkbox theme="ajax"
name="status" value="status"> onclick="submitForm('myStatusForm');" />>
</s:form>> > > the javascript:> > <script type="text/javascript">> function
submitForm(id) {> var form = document.getElementById(id);> form.submit();> }>
</script>> > that should do ya. i'm sure it can be done without requiring a>
separate function, i.e., set onclick to directly submit the form... but> this
is a more general purpose solution, anyway.> >
---------------------------------------------------------------------> To
unsubscribe, e-mail: user-unsubscr...@struts.apache.org> For additional
commands, e-mail: user-h...@struts.apache.org>
_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/products/events.aspx