function ajaxInloggen(strUsername, strPassword){ new AJAX.Request("/ajax/request-handler.asp" , {parameters:"strUsername=" + escape(strUsername) + "&strPassword=" + escape(strPassword) , preloader:false , customHandler:true , responseType:"text" }); } AJAX.Request.prototype.customHandler = function(strResponse){ if (strResponse == "[OK]") { window.location = "/"; } else { document.getElementById('divInloggenInvoerErrorText').innerHTML = strResponse; document.getElementById('divInloggenInvoerError').style.display='block'; } }