<script language="JavaScript" type="text/javascript">var httpReq;function connect(){var statusURL;httpReq = new XMLHttpRequest();httpReq.onreadystatechange = getServerStatus;statusURL = "http://www.worldofwarcraft.com/realmstatus/index.html?"+(new Date()).getTime();httpReq.open("GET", statusURL, true);httpReq.send(null);}function getServerStatus(){if(httpReq.readyState == 4){ // COMPLETED(4) = the document has been completely loaded, successfully or unsuccessfully.if(httpReq.status == 200) { //200 is HTTP OKvar server = "Khadgar";server = server.replace(/\'/g, "'"); //strip out crapvar regex = new RegExp("(up|down)arrow.gif\" [^>]+><\\/td>\\s+<td [^>]+><b [^>]+>" + server); //regex to extract the statusvar response = httpReq.responseText; //the entire body of the pagevar status = regex.exec(response);document.write(server + " is: " );if(status[1] == "up"){// document.getElementById("status").src = "img/uparrow.gif";document.write("<img src='img/uparrow.gif'>"); }else if(status[1] == "down"){//document.getElementById("status").src = "img/downarrow.gif";document.write("<img src='img/downarrow.gif'>");}}} }</SCRIPT>onload="connect()";>
OK, so this is what I have from that link Choco gave up there. So I've edited it to change the server to my server (Khadgar), and have changed the page that the script is searching to the US status page (since this script was made with the Europe page in mind). So now can someone tell me exactly how to go about implementing it? B/c I'm wondering if I put this is the head (and if so, what do I put in the body as the output of the script), or if I put this right in the body where I want it...Sorry for being dense. HTML is more my thing than Java, so I'm learning as I go.Anyone?