On a 'normal' page the script below works, and I get things as I wish.
(Btw, this script is not mine, it's been floating here and there on this forum/web.
http://www.i-do-this.com/blog/AJAX-Form ... builder/57 )
But if the content of the pade is loaded through ajax, it won't... As I expected.
The code below is the script...
the jquery.form.js is loaded as last in the main template
Code: Select all
	jQuery(document).ready(function(){	
	var contact_form = $('#ajax_form_wrap form');
	  function formValidate(formData, jqForm, options) { 
	    contact_form.fadeOut("slow", function(){$(".throbber").fadeIn("slow")});
	    return true;
	  };
	 
	    var options = {
	        target: '#ajax_form_wrap',  
	        beforeSubmit: formValidate,  
	        type: 'post'
	     };
	 
	contact_form.attr('action','index.php?page=result&showtemplate=false').ajaxForm(options);
/* 	contact_form.attr('action','{/literal}{ldelim}$cgsimple->self_url(){rdelim}}{literal}#reserveren?showtemplate=false').ajaxForm(options); */
	});
I realize this might be to little info, but am not sure what more info is needed. Please do not hesitate to ask!





 
  
 