javascript - Issue with jQuery $.get in IE -


I have a login form that appears at the top of all my pages when the user is logged out. My current jQuery / JavaScript code works in Firefox 3, but IE 7 does not. The code asks for a page that returns a "successful" or "false" string, depending on whether the login was successful or not. In my $ .ready () function call, I have the following ...

  $ ('# login_form'). Submit (function () {var email = $ ('input # login_email') .val (); var pw = $ ('input # login_password'). Val () $ .get ('/ user / login.php' , {Login_email: email, login_password: pw}, function {alert ('successful'); if (data == 'true') {$ ('# login_error'). Hide (); window. Location = '/ User / home.fp'; warning ('true');} other ($ ('# login_error'). Show (); alerts ('false');}}); alert ('called'); Returning;});  

In FF, I'm successfully transferring to the intended page. In IE, however, call the "Alert" below "Nothing else. When I refresh the page, I can see that the $ .get call is going explicitly because I'm logged in, but the callback function does not seem to say that (" if successful Go "is not popping). I also can not find any JavaScript error messages.

Why is not it working in IE?

thanks

Edit: Since some people ask, whenever I ask Mr. email / password or have incorrectly recorded, nothing happens in the callback function. If I manually refresh the page after signing in, I'm logged in. Otherwise, I'm not.

Edit 2: If I do not have anything in IE in the data code> callback function (I do not get a warning popup). In FF, it alerts valid for valid email / PW congoos and false for false I am using jQuery 1.3.2

Edit 3: Ok, guys, I tried the matter of R. Bemaroos and I'm getting "Parscier" on the returned data. I'm just buzzing 'true' or 'false' from other PHP scripts. I tried 'yes' and 'no', but he also gave me a parse error. In addition, it also works in Chrome in addition to FF.

Use your feedback type:

header ("content-type: application / XML; charset = UTF-8 ");


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -