[jQuery] Re: page refreshs on form submit

2008-10-15 Thread [EMAIL PROTECTED]
Thanks, it was indeed a js-error, but not in the script I called. The magic: "data: this.serialize()," should be "data: jQuery(this).serialize()," and that's it. Additional I can say that "return false" is only needed at the end of onsubmit (at least it works with opera nd ff, no ie here to tes

[jQuery] Re: page refreshs on form submit

2008-10-15 Thread MorningZ
Yeah, you're right... my example wasn't correct or working I will note, that if you have any sort of javascript error, then the code will never reach the "return false" and stop the action from happening. meaning it will continue to do a full post to the other page on top of that advice

[jQuery] Re: page refreshs on form submit

2008-10-15 Thread [EMAIL PROTECTED]
Hi, thanks for your response. Do you mean something like this? jQuery.ajax({type:'POST', dataType: 'json', data: this.serialize(), url:'/trainingHelper/user/signUp', success:function(data,textStatus) {

[jQuery] Re: page refreshs on form submit

2008-10-14 Thread MorningZ
Yuck Break out the $.ajax code out of the markup, that's just making it tons more difficult to debug $(document).ready(function() { $.ajax({ type:'POST', dataType: 'json', data: this.serialize(), url:'/trainingHelper/user/signUp', success:function(data,text