like explained here: REQ: universal Ajax function/script to activate/deactivate i’d like to have a guy who can build a complete small solution for my ajax needs…
here is something i think is a start;
Code:
function toggle_ajax(object, do, id, progress)
{
var fetched_object = fetch_object(object);
{
var fetched_object = fetch_object(object);
// show the progress icon while performing action
if(progress) {
fetched_object.innerHTML = ‘‘;
}
var sUrl = ‘ajax.php’;
var postData = ‘do=’ + do + ‘&securitytoken=’ + SECURITYTOKEN;
var request = YAHOO.util.Connect.asyncRequest(‘POST’, sUrl, toggle_callback, postData);
return false;
}
Views: 3