submit will the send the form and reload the page,
as suggested above, you should use either $(fom).send() or

$(form).addEvent('submit', function (event) {

  //prevent form from being sent
  event.stop();

  //send form data using ajax
})

On Tue, Sep 8, 2009 at 4:04 PM, Thierry bela nanga <[email protected]> wrote:

> submit will the send the form and reload the page,
> as suggested above, you should use either $(fom).send() or
>
> $(form).addEvent('submit', function (event) {
>
>
>   event.stop();
> })
>
>
> On Tue, Sep 8, 2009 at 3:54 PM, H13 <[email protected]> wrote:
>
>>
>> This post:
>> http://www.webdeveloper.com/forum/showthread.php?t=203276
>> is exactly what I am trying to solve. But of course changing style of
>> submit button is not solution :-(
>> If this can work with jquery, there should exist some solution, how to
>> accept the submit as event in mootools
>>
>>
>>
>> On 8 zář, 15:11, H13 <[email protected]> wrote:
>> > Hi,
>> >
>> > yes, because no AJAX will be used but the site will be reloaded (the
>> > right form will be sent in the POST), so the ID is OK.
>> >
>> > The idea is to say, the submit was run ( onclick="$('formid').sumbit
>> > ()" ) so then AJAX can work with submit event ( $('formid').addEvent
>> > ('submit', function(e){ )
>> >
>> > Jan
>> >
>> > Steve Onnis napsal(a):
>> >
>> > > Sure you have the ID of the form correct?
>> >
>> > > -----Original Message-----
>> > > From: H13 [mailto:[email protected]]
>> > > Sent: Tuesday, 8 September 2009 2:41 AM
>> > > To: MooTools Users
>> > > Subject: [Moo] Re: Submit()
>> >
>> > > Hi, thank you for answers but:
>> >
>> > > if I use:
>> > > ---
>> > > $('formid').send();
>> > > ---
>> > > I get (in firebug):
>> > > ---
>> > > b is null
>> > > anonymous(Object)mootools-core.js (line 338)
>> > > anonymous()mootools-core.js (line 97)
>> > > anonymous(Object name=a)mootools-core.js (line 346)
>> > > function onclick(event) { $("form1").send(); }(click clientX=461,
>> > > clientY=294)1 (line 2)
>> > > [Break on this error] }var e=b.lastIndexOf("/");if(e>-1&&(e=b....
>> > > (a.toUpperCase(),b,this.options.async);\n
>> > > ---
>> > > :-(
>> >
>> > > If I use:
>> > > ---
>> > > onclick="$('formid').fireEvent('submit');"
>> > > ---
>> > > I get:
>> > > ---
>> > > a is undefined
>> > > anonymous(Object name=a, Window store.php)mootools-core.js (line 82)
>> > > anonymous(Object name=e)script.php (line 6)
>> > > anonymous()mootools-core.js (line 57)
>> > > anonymous(Object name=d)mootools-core.js (line 58)
>> > > anonymous(function())mootools-core.js (line 185)
>> > > anonymous("submit", Object name=b, Object name=a)mootools-core.js
>> > > (line 186)
>> > > function onclick(event) { $("form1").fireEvent("submit"); }(click
>> > > clientX=441, clientY=287)1 (line 2)
>> > > [Break on this error] var Event=new Native({name:"Event",initi...rn
>> a;}
>> > > this.$extended=true;var j=a.type;\n
>> > > ---
>>
>
>
>
> --
> http://tbela99.blogspot.com/
>
> fax : (+33) 08 26 51 94 51
>



-- 
http://tbela99.blogspot.com/

fax : (+33) 08 26 51 94 51

Reply via email to