Php form inside colorbox pop up

Hi,

I have changed a bit of code and I do have movement and in the right direction it seems, just wondered if it could be checked over, and if good that’s great, but there one issue that needs to be resolved is that on submit colorbox disappears and instead it opens up full screen.

This is what Im doing now

jQuery(function(){ 
jQuery('.cbox-form').colorbox({maxWidth: '100%', onComplete: function(){ 
cbox_submit(); 
}}); 
}); 
function cbox_submit() 
{ 
jQuery("#pre-process").submit(function(){ 
$("#pre-process").ajaxSubmit({url: 'myform.php', type: 'post'});   
return false; 
}); 
}

As reference so you can see it working, if you click the large green button in the header image at the link below -

dev area