This is really anoying me.
I have a simple HTML form that I'm submitting with jQuery.
$("#RecruitmentRequest").submit(function(evt) {
evt.preventDefault();
var formval = $( this ).find(":input:not(:hidden)").serialize();
$.ajax({
type: "POST",
url: "addrec.php",
data: formval
});//ajax
});//end submit
If load the html and submit the form very quickly then dump the $_REQUEST
var in my PHP I get a nice looking array of key=>value pairs.
If however I let the page settle for 15 seconds before submitting my form the $_REQUEST
var is empty!
I have added alerts to the JQ to show the contents of the formval
var both before and after the ajax call, and lit always ooks OK.
Other jQuery stuff on the page continues to function just fine:
$('input:radio[name=bu]').click(function(){
var unit=$(this).attr('data-unit');
var newname=$('#rrtbau_exec').attr('data-' + unit);
$('#rrtbau_exec').val(newname);
});//business unit radio click
All the jQuery is in a $(document).ready(function(){...});
container.
Any thoughts?