This documentation relates to an earlier version of Atlassian Gadgets.
View

Unknown macro: {spacejump}

or visit the current documentation home.

This page is part of the Gadget Developers' JavaScript Cookbook.

How do I make Ajax calls?

The framework wraps the OpenSocial gadgets.io.makeRequest method with the standard jQuery interface. You should write code as if you were just using the jQuery interface. For example:

AJS.$.ajax({
  url: "/rest/gadget/1.0/filtersAndProjects",
  type: "GET",
  data: ({projectsOnly : "true"}),
  dataType: "json",
  success: function(msg){
    alert(msg);
  }
});

RELATED TOPICS

Gadget Developers' JavaScript Cookbook
Using the Atlassian Gadgets JavaScript Framework

  • No labels