1425 lines
73 KiB
HTML
1425 lines
73 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>API: connection YAHOO.util.Connect (YUI Library)</title>
|
|
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css">
|
|
<link rel="stylesheet" type="text/css" href="assets/api.css">
|
|
</head>
|
|
|
|
<body id="yahoo-com">
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="hd">
|
|
<h1>Yahoo! UI Library</h1>
|
|
<h3>connection </h3>
|
|
<p>
|
|
<a href="./index.html">Yahoo! UI Library</a>
|
|
> <a href="./module_connection.html">connection</a>
|
|
> YAHOO.util.Connect
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
|
|
<h2>
|
|
|
|
|
|
|
|
|
|
Class <b>YAHOO.util.Connect</b>
|
|
<span class="extends">
|
|
</span>
|
|
|
|
<span class="extends">
|
|
</span>
|
|
|
|
</code>
|
|
</h2>
|
|
<!-- class tree goes here -->
|
|
|
|
|
|
|
|
|
|
<div class="summary description">
|
|
The Connection Manager provides a simplified interface to the XMLHttpRequest
|
|
object. It handles cross-browser instantiantion of XMLHttpRequest, negotiates the
|
|
interactive states and server response, returning the results to a pre-defined
|
|
callback you create.
|
|
</div>
|
|
|
|
|
|
<div class="section field details">
|
|
<h3><a name="field_detail">Properties</a></h3>
|
|
<div class="content">
|
|
<h4><a name="_default_post_header">_default_post_header</a>
|
|
<code>- private static boolean</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Determines if a default header of
|
|
Content-Type of 'application/x-www-form-urlencoded'
|
|
will be added to any client HTTP headers sent for POST
|
|
transactions.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_formNode">_formNode</a>
|
|
<code>- private static object</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Property modified by setForm() to set a reference to the HTML
|
|
form node if the desired action is file upload.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_has_http_headers">_has_http_headers</a>
|
|
<code>- private static boolean</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Determines if HTTP headers are set.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_http_header">_http_header</a>
|
|
<code>- private static object</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Object literal of HTTP header(s)
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_isFileUpload">_isFileUpload</a>
|
|
<code>- private static boolean</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Property modified by setForm() to determine if a file(s)
|
|
upload is expected.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_isFormSubmit">_isFormSubmit</a>
|
|
<code>- private static boolean</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Property modified by setForm() to determine if the data
|
|
should be submitted as an HTML form.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_msxml_progid">_msxml_progid</a>
|
|
<code>- private static array</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Array of MSFT ActiveX ids for XMLHttpRequest.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_poll">_poll</a>
|
|
<code>- private static object</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Collection of polling references to the polling mechanism in handleReadyState.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_polling_interval">_polling_interval</a>
|
|
<code>- private static int</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
The polling frequency, in milliseconds, for HandleReadyState.
|
|
when attempting to determine a transaction's XHR readyState.
|
|
The default is 50 milliseconds.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_sFormData">_sFormData</a>
|
|
<code>- private static string</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Property modified by setForm() to set the HTML form data
|
|
for each transaction.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_timeOut">_timeOut</a>
|
|
<code>- private static object</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Queue of timeout values for each transaction callback with a defined timeout value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_transaction_id">_transaction_id</a>
|
|
<code>- private static int</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
A transaction counter that increments the transaction id for each transaction.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
<h4><a name="_use_default_post_header">_use_default_post_header</a>
|
|
<code>- private static boolean</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
Determines if a default header of
|
|
Content-Type of 'application/x-www-form-urlencoded'
|
|
will be added to any client HTTP headers sent for POST
|
|
transactions.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="section method details">
|
|
<h3><a name="methodDetails">Methods</a></h3>
|
|
<div class="content">
|
|
<h4>
|
|
<a name="abort">abort</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
boolean
|
|
<strong>abort</strong>
|
|
(
|
|
|
|
|
|
o
|
|
|
|
|
|
,
|
|
callback
|
|
|
|
|
|
,
|
|
isTimeout
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Method to terminate a transaction, if it has not reached readyState 4.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>o <object></code>
|
|
The connection object returned by asyncRequest.
|
|
</dd>
|
|
<dd>
|
|
<code>callback <object></code>
|
|
User-defined callback object.
|
|
</dd>
|
|
<dd>
|
|
<code>isTimeout <string></code>
|
|
boolean to indicate if abort was a timeout.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
boolean
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="appendPostData">appendPostData</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
array
|
|
<strong>appendPostData</strong>
|
|
(
|
|
|
|
|
|
postData
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Parses the POST data and creates hidden form elements
|
|
for each key-value, and appends them to the HTML form object.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>postData <string></code>
|
|
The HTTP POST data
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
array
|
|
</code></dt>
|
|
<dd>formElements Collection of hidden fields.</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="asyncRequest">asyncRequest</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
object
|
|
<strong>asyncRequest</strong>
|
|
(
|
|
|
|
|
|
method
|
|
|
|
|
|
,
|
|
uri
|
|
|
|
|
|
,
|
|
callback
|
|
|
|
|
|
,
|
|
postData
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Method for initiating an asynchronous request via the XHR object.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>method <string></code>
|
|
HTTP transaction method
|
|
</dd>
|
|
<dd>
|
|
<code>uri <string></code>
|
|
Fully qualified path of resource
|
|
</dd>
|
|
<dd>
|
|
<code>callback <callback></code>
|
|
User-defined callback function or object
|
|
</dd>
|
|
<dd>
|
|
<code>postData <string></code>
|
|
POST body
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
object
|
|
</code></dt>
|
|
<dd>Returns the connection object</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="createExceptionObject">createExceptionObject</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
object
|
|
<strong>createExceptionObject</strong>
|
|
(
|
|
|
|
|
|
tId
|
|
|
|
|
|
,
|
|
callbackArg
|
|
|
|
|
|
,
|
|
isAbort
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
If a transaction cannot be completed due to dropped or closed connections,
|
|
there may be not be enough information to build a full response object.
|
|
The failure callback will be fired and this specific condition can be identified
|
|
by a status property value of 0.
|
|
If an abort was successful, the status property will report a value of -1.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>tId <int></code>
|
|
The Transaction Id
|
|
</dd>
|
|
<dd>
|
|
<code>callbackArg <callbackArg></code>
|
|
The user-defined argument or arguments to be passed to the callback
|
|
</dd>
|
|
<dd>
|
|
<code>isAbort <boolean></code>
|
|
Determines if the exception case is caused by a transaction abort
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
object
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="createFrame">createFrame</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>createFrame</strong>
|
|
(
|
|
|
|
|
|
secureUri
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Creates an iframe to be used for form file uploads. It is remove from the
|
|
document upon completion of the upload transaction.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>secureUri <string></code>
|
|
Optional qualified path of iframe resource for SSL in IE.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="createResponseObject">createResponseObject</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
object
|
|
<strong>createResponseObject</strong>
|
|
(
|
|
|
|
|
|
o
|
|
|
|
|
|
,
|
|
callbackArg
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
This method evaluates the server response, creates and returns the results via
|
|
its properties. Success and failure cases will differ in the response
|
|
object's property values.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>o <object></code>
|
|
The connection object
|
|
</dd>
|
|
<dd>
|
|
<code>callbackArg <callbackArg></code>
|
|
The user-defined argument or arguments to be passed to the callback
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
object
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="createXhrObject">createXhrObject</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>createXhrObject</strong>
|
|
(
|
|
|
|
|
|
transactionId
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Instantiates a XMLHttpRequest object and returns an object with two properties:
|
|
the XMLHttpRequest instance and the transaction id.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>transactionId <int></code>
|
|
Property containing the transaction id for this transaction.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd>object</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="getConnectionObject">getConnectionObject</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
object
|
|
<strong>getConnectionObject</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
This method is called by asyncRequest to create a
|
|
valid connection object for the transaction. It also passes a
|
|
transaction id and increments the transaction id counter.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
object
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="handleReadyState">handleReadyState</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>handleReadyState</strong>
|
|
(
|
|
|
|
|
|
o
|
|
|
|
|
|
,
|
|
callback
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
This method serves as a timer that polls the XHR object's readyState
|
|
property during a transaction, instead of binding a callback to the
|
|
onreadystatechange event. Upon readyState 4, handleTransactionResponse
|
|
will process the response, and the timer will be cleared.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>o <object></code>
|
|
The connection object
|
|
</dd>
|
|
<dd>
|
|
<code>callback <callback></code>
|
|
The user-defined callback object
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="handleTransactionResponse">handleTransactionResponse</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>handleTransactionResponse</strong>
|
|
(
|
|
|
|
|
|
o
|
|
|
|
|
|
,
|
|
callback
|
|
|
|
|
|
,
|
|
isAbort
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
This method attempts to interpret the server response and
|
|
determine whether the transaction was successful, or if an error or
|
|
exception was encountered.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>o <object></code>
|
|
The connection object
|
|
</dd>
|
|
<dd>
|
|
<code>callback <object></code>
|
|
The sser-defined callback object
|
|
</dd>
|
|
<dd>
|
|
<code>isAbort <boolean></code>
|
|
Determines if the transaction was aborted.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="initHeader">initHeader</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong>initHeader</strong>
|
|
(
|
|
|
|
|
|
label
|
|
|
|
|
|
,
|
|
value
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Public method that stores the custom HTTP headers for each transaction.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>label <string></code>
|
|
The HTTP header label
|
|
</dd>
|
|
<dd>
|
|
<code>value <string></code>
|
|
The HTTP header value
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="isCallInProgress">isCallInProgress</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
boolean
|
|
<strong>isCallInProgress</strong>
|
|
(
|
|
|
|
|
|
o
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Public method to check if the transaction is still being processed.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>o <object></code>
|
|
The connection object returned by asyncRequest
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
boolean
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="releaseObject">releaseObject</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>releaseObject</strong>
|
|
(
|
|
|
|
|
|
o
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Dereference the XHR instance and the connection object after the transaction is completed.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>o <object></code>
|
|
The connection object
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="resetFormState">resetFormState</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>resetFormState</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Resets HTML form properties when an HTML form or HTML form
|
|
with file upload transaction is sent.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="setDefaultPostHeader">setDefaultPostHeader</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong>setDefaultPostHeader</strong>
|
|
(
|
|
|
|
|
|
b
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Member to enable or disable the default POST header.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>b <boolean></code>
|
|
Set and use default header - true or false .
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd>void</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="setForm">setForm</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
string
|
|
<strong>setForm</strong>
|
|
(
|
|
|
|
|
|
form
|
|
|
|
|
|
,
|
|
optional
|
|
|
|
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
This method assembles the form label and value pairs and
|
|
constructs an encoded string.
|
|
asyncRequest() will automatically initialize the
|
|
transaction with a HTTP header Content-Type of
|
|
application/x-www-form-urlencoded.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>form <string || object></code>
|
|
id or name attribute, or form object.
|
|
</dd>
|
|
<dd>
|
|
<code>optional <string></code>
|
|
boolean to indicate SSL environment.
|
|
</dd>
|
|
<dd>
|
|
<code>optional <string || boolean></code>
|
|
qualified path of iframe resource for SSL in IE.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
string
|
|
</code></dt>
|
|
<dd>string of the HTML form field name and value pairs..</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="setHeader">setHeader</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>setHeader</strong>
|
|
(
|
|
|
|
|
|
o
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Accessor that sets the HTTP headers for each transaction.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>o <object></code>
|
|
The connection object for the transaction.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="setPollingInterval">setPollingInterval</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong>setPollingInterval</strong>
|
|
(
|
|
|
|
|
|
i
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Member to modify the default polling interval.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>i <int></code>
|
|
The polling interval in milliseconds.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd>void</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="setProgId">setProgId</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong>setProgId</strong>
|
|
(
|
|
|
|
|
|
id
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Member to add an ActiveX id to the existing xml_progid array.
|
|
In the event(unlikely) a new ActiveX id is introduced, it can be added
|
|
without internal code modifications.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>id <string></code>
|
|
The ActiveX id to be added to initialize the XHR object.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd>void</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
<h4>
|
|
<a name="uploadFile">uploadFile</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
static
|
|
|
|
void
|
|
<strong>uploadFile</strong>
|
|
(
|
|
|
|
|
|
id
|
|
|
|
|
|
,
|
|
callback
|
|
|
|
|
|
,
|
|
uri
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Uploads HTML form, including files/attachments, to the
|
|
iframe created in createFrame.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>id <int></code>
|
|
The transaction id.
|
|
</dd>
|
|
<dd>
|
|
<code>callback <object></code>
|
|
- User-defined callback object.
|
|
</dd>
|
|
<dd>
|
|
<code>uri <string></code>
|
|
Fully qualified path of resource.
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<div class="nav">
|
|
|
|
<div class="module">
|
|
<h4>Modules</h4>
|
|
<ul class="content">
|
|
<li><a href="module_animation.html">animation</a></li>
|
|
<li><a href="module_autocomplete.html">autocomplete</a></li>
|
|
<li><a href="module_calendar.html">calendar</a></li>
|
|
<li><a href="module_connection.html">connection</a></li>
|
|
<li><a href="module_container.html">container</a></li>
|
|
<li><a href="module_dom.html">dom</a></li>
|
|
<li><a href="module_dragdrop.html">dragdrop</a></li>
|
|
<li><a href="module_event.html">event</a></li>
|
|
<li><a href="module_logger.html">logger</a></li>
|
|
<li><a href="module_menu.html">menu</a></li>
|
|
<li><a href="module_slider.html">slider</a></li>
|
|
<li><a href="module_tabview.html">tabview</a></li>
|
|
<li><a href="module_treeview.html">treeview</a></li>
|
|
<li><a href="module_yahoo.html">yahoo</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Classes</h4>
|
|
<ul class="content">
|
|
<li><a href="YAHOO.util.Connect.html">YAHOO.util.Connect</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Files</h4>
|
|
<ul class="content">
|
|
<li><a href="connection.js.html">connection.js</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Properties</h4>
|
|
<ul class="content">
|
|
<li><a href="#_default_post_header">_default_post_header</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_formNode">_formNode</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_has_http_headers">_has_http_headers</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_http_header">_http_header</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_isFileUpload">_isFileUpload</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_isFormSubmit">_isFormSubmit</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_msxml_progid">_msxml_progid</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_poll">_poll</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_polling_interval">_polling_interval</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_sFormData">_sFormData</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_timeOut">_timeOut</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_transaction_id">_transaction_id</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
<li><a href="#_use_default_post_header">_use_default_post_header</a>
|
|
<!--<code><boolean></code>-->
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Methods</h4>
|
|
<ul class="content">
|
|
<li><!--<code>boolean</code>-->
|
|
<a href="#abort">abort</a>
|
|
</li>
|
|
<li><!--<code>array</code>-->
|
|
<a href="#appendPostData">appendPostData</a>
|
|
</li>
|
|
<li><!--<code>object</code>-->
|
|
<a href="#asyncRequest">asyncRequest</a>
|
|
</li>
|
|
<li><!--<code>object</code>-->
|
|
<a href="#createExceptionObject">createExceptionObject</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#createFrame">createFrame</a>
|
|
</li>
|
|
<li><!--<code>object</code>-->
|
|
<a href="#createResponseObject">createResponseObject</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#createXhrObject">createXhrObject</a>
|
|
</li>
|
|
<li><!--<code>object</code>-->
|
|
<a href="#getConnectionObject">getConnectionObject</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#handleReadyState">handleReadyState</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#handleTransactionResponse">handleTransactionResponse</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#initHeader">initHeader</a>
|
|
</li>
|
|
<li><!--<code>boolean</code>-->
|
|
<a href="#isCallInProgress">isCallInProgress</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#releaseObject">releaseObject</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#resetFormState">resetFormState</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#setDefaultPostHeader">setDefaultPostHeader</a>
|
|
</li>
|
|
<li><!--<code>string</code>-->
|
|
<a href="#setForm">setForm</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#setHeader">setHeader</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#setPollingInterval">setPollingInterval</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#setProgId">setProgId</a>
|
|
</li>
|
|
<li><!--<code>void</code>-->
|
|
<a href="#uploadFile">uploadFile</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="ft">
|
|
<hr />
|
|
Copyright © 2006 Yahoo! Inc. All rights reserved.
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|