Archive
Basic Questions on PHP Part2
I Love Firefox

Credit Card Traps
The credit card is one of the very good facilities offered by banks. But some times this facility becomes a hassle for you and you feel like trapped. I’ve been through same kind of experience last month.AJAX Request Using YUI
<html>
<head>
<title>Simple Ajax Request</title>
<script type=”text/javascript” src=”http://yui.yahooapis.com/2.7.0/build/yahoo/yahoo-min.js”></script>
<script type=”text/javascript” src=”http://yui.yahooapis.com/2.7.0/build/event/event-min.js”></script>
<script type=”text/javascript” src=”http://yui.yahooapis.com/2.7.0/build/connection/connection-min.js”></script>
</head>
<body>
<h1>Simple Example of creating Ajax Request</h1>
<script>
//The callback function:
var callback = {
success: function(a){
//Assign the resonse to the HTML element
document.getElementById(‘response’).innerHTML = a.responseText;
},
failure: function(a){
//Alert the failure message
alert(a.statusText);
}
}
//Make the Ajax request:
function ajaxRequest(){
var newRequest = YAHOO.util.Connect.asyncRequest(‘GET’, ‘Request/Url’, callback);
}
</script>
<!–The div element in which the resonse will be shown –>
<div id=”response”></div>
<input type=”button” value=”Create Request” onClick=”ajaxRequest();”>
</body>
</html>
Hope this example helped in better understanding of Ajax using YUI.
YUI Profiler
The HTML part will display a button “Create Profile”. Clicking on that button will generate the report of the pObject.sayHello() function call and display the result in the div with id “p_report”.
This is just an example of how to use YUI code profiler. Hope this will help creating code profiles.
Recent Comments