Print Friendly

# Class Ext.data.ScriptTagProxy

Package: | Ext.data
Class: | ScriptTagProxy
Extends: | Object
Defined In: | ScriptTagProxy.js

An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain other than the originating domain of the running page.

Note that this class must be used to retrieve data from a domain other than the domain from which the running page was served.

Properties - Methods - Events - Config Options

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| ScriptTagProxy(`Object conn`) | ScriptTagProxy
| abort() : void | ScriptTagProxy
Abort the current server request.
| load(`Object params`, `Ext.data.DataReader reader`, `Function callback`, `Object scope`, `Object arg`) : void | ScriptTagProxy
Load data from the configured URL, read the data object into a block of Ext.data.Records using the passed Ext.data.Da...

## Public Events

This class has no public events.

## Config Options

Config Options | Defined By
--- | ---
| callbackParam : String | ScriptTagProxy
(Optional) The name of the parameter to pass to the server which tells the server the name of the callback function s...
| timeout : Number | ScriptTagProxy
(Optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
| url : String | ScriptTagProxy
The url from which to request the data object.
| {Boolean} : nocache | ScriptTagProxy
(Optional) Defaults to true. Disable cacheing by adding a unique parameter name to the request.

## Constructor Details

### ScriptTagProxy

`public function ScriptTagProxy(`Object conn`)`
Parameters:

- `conn` : Object
  A configuration object.

## Method Details

### abort

`public function abort()`
Abort the current server request.
Parameters:

- None.

Returns:

- `void`

This method is defined by ScriptTagProxy.

### load

`public function load(`Object params`, `Ext.data.DataReader reader`, `Function callback`, `Object scope`, `Object arg`)`
Load data from the configured URL, read the data object into a block of Ext.data.Records using the passed Ext.data.DataReader implementation, and process that block using the passed callback.
Parameters:

- `params` : Object
  An object containing properties which are to be used as HTTP parameters for the request to the remote server.
- `reader` : Ext.data.DataReader
  The Reader object which converts the data object into a block of Ext.data.Records.
- `callback` : Function
  The function into which to pass the block of Ext.data.Records. The function must be passed
  - The Record block object
  - The "arg" argument from the load function
  - A boolean success indicator
- `scope` : Object
  The scope in which to call the callback
- `arg` : Object
  An optional argument which is passed to the callback as its second parameter.

Returns:

- `void`

This method is defined by ScriptTagProxy.

## Config Details

### callbackParam

`callbackParam : String`
(Optional) The name of the parameter to pass to the server which tells the server the name of the callback function set up by the load call to process the returned data object. Defaults to "callback".

The server-side processing must read this parameter value, and generate javascript output which calls this named function passing the data object as its only parameter.

This config option is defined by ScriptTagProxy.

### timeout

`timeout : Number`
(Optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
This config option is defined by ScriptTagProxy.

### url

`url : String`
The url from which to request the data object.
This config option is defined by ScriptTagProxy.

### {Boolean}

`{Boolean} : nocache`
(Optional) Defaults to true. Disable cacheing by adding a unique parameter name to the request.
This config option is defined by ScriptTagProxy.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.