I think you want fireEvent()

 
<a onclick="$('form1').fireEvent('submit')" >Send</a>




-----Original Message-----
From: H13 [mailto:[email protected]] 
Sent: Tuesday, 8 September 2009 1:11 AM
To: MooTools Users
Subject: [Moo] Submit()


Hi, is there some equivalent for jquery's submit() in mootools.

If I use this with jquery:
<form method="post" action="" id="form1" >
...
</form>
<a onclick="$(\'#form1\').submit();" >Send</a>'

The site will be not reloaded and AJAX code will be run:
$('#form1').submit(function(){ ...


but if I use the same with mootools:
<form method="post" action="" id="form1" >
...
</form>
<a onclick="$(\'form1\').submit();" >Send</a>'

The site will be reloaded and no AJAX code will be run :-( :
$('form1').addEvent('submit', function(e){
                new Event(e).stop(); ... will be ignored :-(


Is there some solution, so form can be submitted (with help of AJAX)
in case user clicks on URL

Thank you for your help.

Reply via email to