Mercurial > hg-website
diff src/en/javascript/main.js @ 61:16016cc18ded
Backed out changeset baf1530ba0b0
author | David Soria Parra <dsp@php.net> |
---|---|
date | Wed, 18 Feb 2009 01:19:32 +0100 |
parents | baf1530ba0b0 |
children |
line wrap: on
line diff
--- a/src/en/javascript/main.js Mon Feb 16 07:14:20 2009 -0700 +++ b/src/en/javascript/main.js Wed Feb 18 01:19:32 2009 +0100 @@ -15,7 +15,7 @@ var xmlhttp = null; -function loadXMLDoc(url, stateChange) { +function loadXMLDoc(url) { if (window.XMLHttpRequest) {// code for Firefox, Opera, IE7, etc. xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject) {// code for IE6, IE5 @@ -30,8 +30,7 @@ } } -// client OS specific page section -function browserUsageRequestStateChange() { +function stateChange() { if (xmlhttp.readyState==4) {// 4 = "loaded" document.getElementById('replace').innerHTML = xmlhttp.responseText; } @@ -39,21 +38,6 @@ addLoadEvent(function () { if (navigator.appVersion.indexOf("Win")!=-1) { - loadXMLDoc("win.html", browserUsageRequestStateChange); + loadXMLDoc("win.html"); } }); - -// random quotes -function quoteRequestStateChange() { - if (xmlhttp.readyState==4) {// 4 = "loaded" - document.getElementById('quote').innerHTML = xmlhttp.responseText; - } -} - -function randomNumber(low, high) { - return Math.floor(Math.random()*(high-low+1))+low; -} - -addLoadEvent(function () { - loadXMLDoc("quotes/" + randomNumber(1, 17) + ".txt", quoteRequestStateChange); -});