This recipe puts most of this chapter together in one example, so you can see everything working together. Additionally, you will see how to send multiple XHR requests, while subscribing to global and transactional custom events.
Create a new HTML page on a testing server, and call the following YUI libraries:
<script src="pathToBuild/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script> <script src="pathToBuild/connection/connection.js" type="text/javascript"></script> <script src="pathToBuild/logger/logger-min.js" type="text/javascript"></script>
Add the following HTML to the page:
<form action="#" enctype="multipart/form-data" id="signup"> <dl> <dt><label for="signup-username">Username</label></dt> <dd><input id="signup-username" name="username" type="text"/></dd> <dt><label for="signup-password">Password</label></dt> <dd...