/* * Name: * ajaxRefresh * * Description: * This Library is used to do a request to refresh the shoutout box after every 60 seconds by ajax * * Preconditions/Input: * - * * Postconditions/Output: * * Stored Procedures: * * Libraries: * * Log : * Shalaka Khot 04/09/2009 * - Creation */ function refresh(url) { // The XMLHttpRequest object var xmlHttp; try{ xmlHttp=new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari } catch (e) { try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer } catch (e){ try{ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("Your browser does not support AJAX."); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4){ document.getElementById("shoutOutBox").innerHTML=xmlHttp.responseText; } } url=url+"&sid="+Math.random(); xmlHttp.open("GET",url,true); xmlHttp.send(null); } // End refresh