var wwwroot = "http://www.medability.ro"; function ajaxCall(url,successFunction,failureFunction){ var sUrl = wwwroot+url; var callback = { success: function(o) { successFunction(o.responseText); }, failure: function(o) { if(failureFunction == null) standardAjaxFailure(o); else failureFunction(o); } } var transaction = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback, null); } function standardAjaxFailure(o){ alert('Eroare de comunicare cu serverul. Va rugam reincercati'); }