You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by lupus <zh...@yahoo.com> on 2007/08/16 18:40:55 UTC

Ajax form_how to submit a ajax form without clicking button?

Hi all,

Is there any way to submit a ajax form automatically without clicking on the
submit button? 

I tried using javascript like "document.theForm1.submit();": when I execute
the js, ajax form action is called but there comes another blank page with
the result instead of showing the result in the same page with the ajax
form.

When I click manually on the submit button of Ajax form, all works well:
result shown in the same page with the ajax form.

According to my testing, the normal way of submitting an ajax form using js
does not work, but how to submit the ajax form without clicking? Pls
help!!!!

Thanks a loooot



-- 
View this message in context: http://www.nabble.com/Ajax-form_how-to-submit-a-ajax-form-without-clicking-button--tf4280769.html#a12184999
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


Re: Ajax form_how to submit a ajax form without clicking button?

Posted by lupus <zh...@yahoo.com>.
I got answers by myself: using document.createEvent('MouseEvents') instead of
form.submit :)
-- 
View this message in context: http://www.nabble.com/Ajax-form_how-to-submit-a-ajax-form-without-clicking-button--tf4280769.html#a12185842
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