title: Register user by using ajax call
body: <p>I'm newbie to jQuery mobile 1.4.3 and javascript, I'm trying to register a new user sending an AJAX Post call to the a web service and I'm lost...</p>
  
  <p>The user registration has to send the following JSON to the web service:</p>
  
  <blockquote>
    <p>{</p>
    
    <p>"userName": "sample string 1",</p>
    
    <p>"email": "sample string 2",</p>
    
    <p>"password": "sample string 3",</p>
    
    <p>"confirmPassword": "sample string 4",</p>
    
    <p>"name": "sample string 5",</p>
    
    <p>"deviceId": "sample string 6"</p>
    
    <p>}</p>
  </blockquote>
  
  <p>The web service url: <a href="http://company.ac-web-systems.eu/api/account/register" rel="nofollow">http://company.ac-web-systems.eu/api/account/register</a></p>
  
  <p>My AJAX code:</p>
  
  <pre><code>    var formData = {
      "userName": "user1",
          "email": "email@mail.com",
          "password": "123456",
          "confirmPassword": "123456",
          "name": "name1",
          "deviceId": "12121212121212"
  };
  
  
  // process the form
  $.ajax({
      type: 'POST', 
      crossDomain: true,
      url: 'http://compay.ac-web-systems.eu/api/account/register', 
      data: formData, // our data object
      dataType: 'json', // what type of data do we expect back from the server
      encode: true
  })
  // using the done promise callback
  .done(function (data) {
  
      // log data to the console so we can see
      console.log(data);
  
  
      // here we will handle errors and validation messages
  });
  </code></pre>
  
  <p>I'm pretty sure the dataForm data structure or the way the data is assembled isn't correct.</p>
  
  <p>I also need some advice if this is the correct way to connect to a web service or is there another better and faster option for jQuery mobile?</p>
  
  <p>Really need a help here.</p>
  
  <p>Thanks in Advance.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I can't seem to reach the service here is the real url: <a href="http://yolp.ac-web-systems.eu/api/account/register" rel="nofollow">http://yolp.ac-web-systems.eu/api/account/register</a></p>