[jQuery] CHROME - jquery ajax error, however, if I add "alert('whatever')" in front of call it works
I am stumped. the latest Google Chrome is now throwing error (giving
aw snap page) when jquery.ajax is called. However, if I put an alert
() message just before the .ajax call or if I pause the execution of
the code using Chrome javascript console, the .ajax call works? If I
simply try to pause execution of the javascript using setTimeout()
then it does not work.
This problem only seems to occur with Google Chrome.
Any suggestions or thoughts?
-----------------------------
function fillYearsCombo() // called after participant chosen
{
var inputs = [];
inputs.push("function=year_combo_box");
inputs.push('pp' + '=' + escape($("#p_articipantname").val()));
$.ajax(
{
data :inputs.join('&'),
url :'aj/aj_register_activities.php',
timeout :2000000000, // need high
error : function()
{
console.log("Failed to update Years Combo.");
},
success : function(r) // note if pause here (using google
chrome javascript console), it works.
{
if(r == "None") // if pause here, does not work.
{
msg = "There are no activities available for this
person at this time.";
$("#naa").html(msg); // #naa => No Activities
Available
$("#naa").show('slow');
}
else
{
$("#naa").html('');
$("#naa").hide('slow');
$("#y_ear").html(r);
}
}
})
}