title: POST a JSON data on a Server URL using Javascript
body: <p>I have prepared a JSON data and I need to post it on the server so that a service can be called. URL to the server is available and I am making an AJAX call for the same to 
  POST the data.</p>
  
  <p>But I dont know where to place the JSON string that is generated.</p>
  
  <p>My Code is as Follows:</p>
  
  <pre><code>function postJSONData(JSONData, localMode)
          {
              var localJSONData = JSONData;
              var postMode = localMode;
  
               $.ajax({
                      type: 'POST',
                      url: 'https://tt.s2.com/tmobile/subscribe-service/uid=ankit_bharat_tanna',
                      dataType: 'xml',
                      success: function(data){
                          alert("SECOND POST JSON DATA");
                      }   // Success Function
      }); // AJAX Call
  
              alert("POST JSON ------------&gt; "+localJSONData +" "+postMode);
          }
  </code></pre>
  
  <p>I want to post JSON data to the server URL. any Parameters to be used?</p>
  
  <p>Thanks,
  Ankit.    </p>