aeroswat Posted January 12, 2010 Share Posted January 12, 2010 Ok it is alerting error2. After it alerts error2 it alerts bla22... self recursion? wtf? Also it shouldn't even get to error2 considering fInp.length is 4 and valu.length is 6 O_o function update(fInp, valu) { alert('bla1'); var ord = document.getElementById('ctrordernumber').value; alert('bla2'); alert (fInp.length); alert (valu.length); if(fInp.length != 0 && valu.length != 0){ $.post("updateorder-exec.php", {field: ""+fInp+"", val: ""+valu+"", on: ""+ord+""}, function(data){ alert('bla22'); if(data.length >0) { alert('bla3'); if(data) { //$('#errDiv').show(); //$('#errDiv').html("Database updated!"); alert('updated'); //$('#errDiv').css('opacity',100).fadeOut(10000); } else{ alert('error'); //$('#errDiv').show(); //$('#errDiv').html("Error. Incorrect information entered!"); //$('#errDiv').css('opacity',100).fadeOut(10000); } return data; } }); } alert('error2'); //$('#errDiv').show(); //$('#errDiv').html("Error. Incorrect information entered!"); //$('#errDiv').css('opacity',100).fadeOut(10000); return 0; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.