Jump to content

Someone help me! What's wrong with this?


aeroswat

Recommended Posts

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;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.