Hi folks,

I've searched the Internet for a while but couldn't find a reason why my
problem occurs.

So, I'm working on a jQuery-plugin for Grails and I'm struggling with an
AJAX-submit of a form.

The attached code, generated by the plugin, leads the browser (Opera
9.6, Firefox 3.0.3 working with jQuery 1.2.6) to show the result on a
new page instead of calling the success-function.

Maybe I'm just to tired at the moment (3 am here), but I can't see my
mistake. Hopefully someone can help me =) 

Cheers
Finn

<!-- snip -->
<script src="/trainingHelper/js/jquery/jquery-1.2.6.js" type="text/javascript">
</script>
</head>
<body>
<form id="signUpForm" name="signUpForm" action="/trainingHelper/user/signUp" 
method="post" onsubmit="$.ajax({type:'POST',dataType: 'json',data: 
this.serialize(), 
url:'/trainingHelper/user/signUp',success:function(data,textStatus){signUpResult(data);},error:function(XMLHttpRequest,textStatus,errorThrown){}});return
 false">
<button type="submit">Sign Up</button>
</form>
</body>
</html>


Reply via email to