title: Getting XMLHttpRequest failed error in parse
body: <p>I am trying to submit data in parse via javascript. But upon sumbit button click I am getting the following error : </p>
  
  <blockquote>
    <p><code>User Query Error :XMLHttpRequest failed: {}</code></p>
  </blockquote>
  
  <p>Below is my code :</p>
  
  <pre><code>user.signUp(null, {
                  success: function(user){
                      alert("Successfully signed up !")
  
                      //Copy the Object ID generated for the user to the UserId field in the profile table.
  
                      var User = Parse.Object.extend("User");
                      var user = new User();
  
                      var userQuery = new Parse.Query(User);
                      userQuery.find({
                          success: function(results)
                          {
                              for (var i in results) 
                              {
                                  //Comparing the username from the User table to the typed username and obtaining
                                  //the corresponding objectId.
                                  if(results[i].get("username")==userName) 
                                  {
                                      var objectId = results[i].get("objectId");
                                      console.log("ObjectId : "+objectId);
                                  }
                                  else
                                  {
                                      console.log("No such user.")
                                  }
                              }
                          } ,error: function(error)
                              {
                                  console.log("User Query Error :"+error.message);
                              }
                      });
                      window.location.href = "index.html";
  
                      } , error: function(user, error){
                          console.log("signup error:"+error.message);
                          alert(" Error in sign up");                     }
                      });
  </code></pre>
  
  <p>I am not able to figure out the exact problem. Can anyone help me out here.</p>