instead of onClick why don’t you just define an ajax function such as:
jQuery(function($) {
jQuery('body').undelegate('input[id="createteam"]','click').delegate('input[id="createteam"]','click',function(){
jQuery.ajax({
'type':'POST',
'url':'/index.php?r=controller/action¶m=value',
'cache':false,
'data':jQuery(this).parents("form").serialize(),
'success':
function(html){
some action here if you want
}});
return false;});
}
when you click the above button it should submit your form in ajax mode (…unless I have some syntax errors in the above example )