title: Why doesn't my jQuery code work in Firefox and Chrome?
body: <p><strong>EDITED</strong></p>
  
  <p>Hi, I use masterpage. And I use formsauthentication in my project. I pull my data from SQL Server 2005. then in login.aspx, I call my pagemethod from jQuery. After all, I run my project in IE9.0, Chrome and Firefox. The project is correct. But this jQuery code is working only IE9.0. </p>
  
  <p>My pagemethod, which is named LoginService, returns "0" or returnURL like "user/Default.aspx", then I control this tah if return of LoginService isn't "0" success will run the following: </p>
  
  <pre><code>alert("there isnt error: " + msg.d);
  </code></pre>
  
  <p>but, if there is an error, this will run:</p>
  
  <pre><code>alert("there is error: " + msg.d);
  </code></pre>
  
  <p>It is very interesting that </p>
  
  <p>if I run this project in IE9, message shown like "there isnt error: user/Default.aspx" </p>
  
  <p>but,</p>
  
  <p>if I run this project in Chrome or Firefox, message shown like "there is error: undefined"</p>
  
  <p>how can I run this project in all browsers?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    jQuery(document).ready(function () {
      jQuery("#myContent_login").focus();
      jQuery("#myContent_submit_image").click(function () {
        jQuery("#login_form_spinner").show();
        jQuery.ajax({
          type: "POST",
          url: "Logon.aspx/LoginService",
          data: "{'username': '" + jQuery("#myContent_login").val() + "', 'password': '" + jQuery("#myContent_password").val() + "','isRemember': '" + jQuery("#myContent_remember_me").is(':checked') + "'}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (msg) {
            if (msg.d != 0) {
              alert("there isnt error: " + msg.d);
            }
          },
          error: function (msg) {
            alert("have error: " + msg.d);
          }
        });
      });
    });
  &lt;/script&gt;
  </code></pre>