When working with the Connection Manager utility you'll never be required to manually create or access an XHR object directly. Instead, you talk to the utility and this works with the XHR object for you using whichever code is appropriate for the browser in use. This means that you don't need separate methods of creating an XHR object in order to keep each browser happy.
A transaction describes the complete process of making a request to the server and receiving and processing the response. Connection Manager handles transactions from beginning to end, providing different services at different points during a request.
Transactions are initiated using the .asyncRequest()
method. As it is a static method we don't need to create an object instance to use it, we simply call it YAHOO.util.Connect.asyncRequest()
. The method takes several arguments:
The HTTP method that the transaction should use, usually the strings
GET
orPOST
The URL of your server-side script...