Table of Contents

IT:AD:JScript:JSON

Tools

Using Js.Ext

Using JSON

Example:

 $.post("test.php", { name: "John", time: "2pm" } );  
 $.post("test.php", { 'choices[]': ["Jon", "Susan"] });
 $.getJSON("test.js", { name: "John", time: "2pm" }, function(json) {
   alert("JSON Data: " + json.users[3].name);
 });

That way you can do (see here):

$.ajax({  
  url: "/path/to/url",  
  type: "POST",  
  dataType: "json",  
  contentType: "application/json",  
  data: JSON.stringify({"foo": "bar"}),  
  success: function(){              
    alert("success :-)");  
  },  
  error: function(){  
    alert("fail :-(");  
  }  
});