For up to date documentation and features, visit http://docs.sencha.com/ext-js/4-0

## Sencha Documentation

# Ext.data.JsonP

This class is used to create JSONP requests. JSONP is a mechanism that allows for making requests for data cross domain. More information is available here: http://en.wikipedia.org/wiki/JSONP

Defined By

### Properties

Ext.data.JsonP
view source
callbackKey : String
Specifies the GET parameter that will be sent to the server containing the function name to be executed when the requ...

Specifies the GET parameter that will be sent to the server containing the function name to be executed when the request completes. Defaults to `callback`. Thus, a common request will be in the form of url?callback=Ext.data.JsonP.callback1

Ext.data.JsonP
view source
disableCaching : Boolean

True to add a unique cache-buster param to requests. Defaults to `true`.

True to add a unique cache-buster param to requests. Defaults to `true`.

Ext.data.JsonP
view source
disableCachingParam : String

Change the parameter which is sent went disabling caching through a cache buster. Defaults to `'_dc'`.

Change the parameter which is sent went disabling caching through a cache buster. Defaults to `'_dc'`.

Ext.data.JsonP
view source
timeout : Number
A default timeout for any JsonP requests. If the request has not completed in this time the failure callback will be ...

A default timeout for any JsonP requests. If the request has not completed in this time the failure callback will be fired. The timeout is in ms. Defaults to `30000`.

Defined By

### Methods

Ext.data.JsonP
view source
abort( Object/String request) : void

Abort a request. If the request parameter is not specified all open requests will be aborted.

Abort a request. If the request parameter is not specified all open requests will be aborted.

### Parameters

- request : Object/String

  (Optional) The request to abort

### Returns

- void

Ext.data.JsonP
view source
request( Object options) : Object

Makes a JSONP request.

Makes a JSONP request.

### Parameters

- options : Object

  An object which may contain the following properties. Note that options will take priority over any defaults that are specified in the class.

  - url : String
    The URL to request.
  - params : Object (Optional)
    An object containing a series of key value pairs that will be sent along with the request.
  - timeout : Number (Optional)
    See timeout
  - callbackKey : String (Optional)
    See callbackKey
  - disableCaching : Boolean (Optional)
    See disableCaching
  - disableCachingParam : String (Optional)
    See disableCachingParam
  - success : Function (Optional)
    A function to execute if the request succeeds.
  - failure : Function (Optional)
    A function to execute if the request fails.
  - callback : Function (Optional)
    A function to execute when the request completes, whether it is a success or failure.
  - scope : Object (Optional)
    The scope in which to execute the callbacks: The "this" object for the callback function. Defaults to the browser window.

### Returns

- Object

  request An object containing the request details.