Jump to content

Recommended Posts

The below function is when I have my users log on.

 

I've been working on this for hours, still unable to figure it out.... When I login with a valid user ID, it correctly logs in... My problem is getting the Alerts to work. When my data did not have mulitple return values it worked... but now that I added the additional parameter from the PHP file, the alerts do no work anymore.... I've attempted to use a $.parseJSON statement on the returnValue, but that doesn't work.....I don't know how to get at the "false" or "-1" output Any suggestions???? Please :)

 

 

-------------------------------------------------the return statement from my PHP file

 

return $json.'^'.$json1;

 

-------------------my debugger output when entering an invalid password

^false

 

--------------------------------------------------------- My .js file

function onSuccessLogin(data)

{

 

 

var temp = data.split("^");

var returnValue = temp[1];

var returnValue2 = temp[2];

 

parseDataJson(returnValue2);

 

 

if (returnValue == 'false')

alert('Login fail');

else

{

if (returnValue == '-1')

{

 

alert('You need to click on your email confirmation first');

}

else

{..........................

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.