Avatar of joyacv2
joyacv2
Flag for Puerto Rico asked on

ajax jquery problem

Hi,

I have the following code:
$.ajax({
    url : "pararlectura.php",
    type: "POST",
    success: function(data, textStatus, jqXHR)
    {
		var prueba = data
		alert(prueba)
		
        if (prueba == "YA"){
			
			alert ("test");
			clearInterval(myVar);
		}

Open in new window


My problem is that my alert(prueba) return YA, but alert("test") loop never executes, what is happening?
jQuery

Avatar of undefined
Last Comment
joyacv2

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
leakim971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
joyacv2

ASKER
excellent! i will close this and open another question about something in this code! Thanks!
joyacv2

ASKER
works perfect!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy