search by tags

for the user

adventures into the land of the command line

jquery ajax cheatcheet

I only have two so far… because… I only used these two…


  method: "GET",
  url: ""

POST then take the response and do something with it

var data = {
  "key1": "some value",
  "key2": "some other value",
  "key3": "some more values"

$.ajax ({
  type : "POST",
  url : "http://my.groovy.url",
  data: JSON.stringify(data, null, '\t'),
  contentType: 'application/json; charset=UTF-8',
  success: function(result) {
    try {
      var myobj = JSON.parse(result.content);
    catch(err) {
      do something here...