function AJAX_execFunction(url, funktion) { if(url) { try { ret = AJAX_getRequest(); if(funktion) { ret.onreadystatechange = function() { if (ret.readyState == 4 && ret.status == 200) { funktion.call(this, ret.responseText); } }; } ret.open("GET", url, true); ret.send(null); } catch(e) { alert("Exception:\n\n"+e); } } else alert("Die Request(url) Funktion benötigt eine URL, die aufgerufen werden soll."); } function AJAX_getRequest() { var xmlHttp=null; if(typeof XMLHttpRequest!='undefined') // if(Firefox, IE 7, etc.) xmlHttp=new XMLHttpRequest(); if(!xmlHttp) // if(IE 5 & 6) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { xmlHttp=null; } } } return xmlHttp; }