I don't understand what you want but still follow the steps below:-
1> Download Prototype JS to simplify your AJAX Requests
2> Include the file in such a way like:-
Code:
<script src="prototype.js"></script>
Code:
<script>
function doAjax()
{
new Ajax.Request("page.php",
{method:"POST/GET", parameters:{xyz:"abc"},
onSuccess : function(trans) { $("divID").innerHTML = trans.responseText; },
onFailure : function() { /* Follow failure code */ },
on404 : function() { /* File doesn't exist !! */ },
on408 : function() { /* Request time out */ doAjax(); },
onException : function() { /* Exception thrown */ }});
}
</script>
