hey im trying to integrate thickbox with submit, im trying to do that once user is click on a button , its opens a thickbox with form, when user fill out the form its vaildate it (with jquery vaildiaton plugin) and then submit it to other page and check if everything is ok (server side php) ive tried to work in 2 methods: 1. iframe: the problem is that once i run this method its not able to run any javascripts and eval() them... 2. ajax: the problem is that once i submit the form, its redirect me to the page of the php instad of stay whithin the thickbox and wait for response in json
how can i fix it? attached code: ---- the submit button that opens the thickbox --- <input value="<?=$lng->p("addevent")?>" id="blue-button" alt="/en/user-admin/events-tasks/events-modals/?height=245&width=395&modal=true&windowID=1" title="Add Event" class="thickbox" type="button" /> ----- the window of the thickbox: -------------- <form action="/all-events.events-tasks.user-admin.Ajax.php" method="post" name="addevent" id="addevent"> <SCRIPT> jQuery(function() { // show a simple loading indicator jQuery().ajaxStart(function() { $('#LoadingDiv').toggle(); }).ajaxStop(function() { $('#LoadingDiv').toggle(); }); jQuery().ajaxError(function(a, b, e) { throw e; $('#LoadingDiv').toggle(); }); var v = jQuery("#addevent").validate({ rules: { date1:{ required:true, date:true }, eventnamepost:{ required:true, minLength: 2, maxLength: 30 } }, messages: { date1:{ }, eventname:{ } } }); submitHandler: function(form) { jQuery(form).ajaxSubmit({ dataType: "json", after: function(result) { if (result.status == 0) { v.showErrors(result.data);v.focusInvalid(); } if (result.status == 1) { alert('ok'); } } }); }}); </SCRIPT> -- View this message in context: http://www.nabble.com/Thickbox-and-AjaxSubmit%28%29-problem....-help-please--%29-tf4024694s15494.html#a11431784 Sent from the JQuery mailing list archive at Nabble.com.