YUI recommends YUI3.
YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.
This documentation is no longer maintained.
To create a GET transaction using Connection Manager, you will need to construct a querystring of key-value pairs and append it to the URL. The following code example provides a step-by-step approach to creating a simple GET transaction.
Click "Send a GET Request" below to try it out, then read the description below to learn how to create a simple transaction using Connection Manager.
Load the Yahoo Global Object and Connection Manager source files:
Construct a querystring with two key-value pairs of username = anonymous
and userid = 0
:
Create a callback object to handle the response, and pass an object literal to both success
and failure
handlers as the argument.
Call YAHOO.util.Connect.asyncRequest
to send the request to get.php
,
and the PHP file will return the readable output of $_GET
via print_r()
.
The handleSuccess
callback will print the response object's properties, including
the server response data.
Note: Logging and debugging is currently turned off for this example.
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.
Copyright © 2013 Yahoo! Inc. All rights reserved.