Doing AJAX with popular javascript libraries

| Basic | Prototype.js | Dojo Toolkit | Yahoo UI Library | ASP.NET | Rails |

Yahoo UI Library

Another javascript framework, that packs lot of power.This one is from Yahoo. It has many cool things to offer, and is similar to Dojo in some ways. We will discuss only the AJAX part here. A typical AJAX call would look like this:
<script type="text/javascript" src="yahoo/yahoo.js"></script>
<script type="text/javascript" 
src="connection/connection-min.js"></script>	

var handleSuccess = function(res)
{alert(res.responseText);} 

var handleError = function(err)
{alert('Something went wrong');}

var callback =
{
	success:handleSuccess,
	failure: handleError ,
	argument: { uid:"A", pwd:"B" }
};

function ValidatePwd() {
var request = YAHOO.util.Connect.asyncRequest('GET', 
		'http://ashishware.com/login.cgi', callback);
}

</script>
The following links contain more information:
http://developer.yahoo.com/yui/examples/connection/get.html
http://developer.yahoo.com/yui/examples/connection/post.html
  • The choice between yahoo UI library and Dojo, It is a matter of taste.
  • Just like Dojo the yahoo UI library has a very enthusiastic community and newer things keep on coming.
  • Yahoo UI Library is another client-side/javascript framework that can be used with multiple web development frameworks.
| Basic | Prototype.js | Dojo Toolkit | Yahoo UI Library | ASP.NET | Rails |


Copyright (c) 2007-2017 Ashish Patil . Please read FAQ for more details.

comments powered by Disqus