From 32b78254c76ebd9a07ad19edf25f1f0846a33bb8 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Sat, 27 Feb 2010 02:12:43 +0100 Subject: Sessions WIP --- javascript/ajax.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'javascript/ajax.js') diff --git a/javascript/ajax.js b/javascript/ajax.js index b9291cf..98006e6 100755 --- a/javascript/ajax.js +++ b/javascript/ajax.js @@ -1,16 +1,16 @@ -function ajax() +function ajax(session) { var xhr=null; - + xhr = new XMLHttpRequest(); //on définit l'appel de la fonction au retour serveur - xhr.onreadystatechange = function() { alert_ajax(xhr); }; - - xhr.open("GET", "streamstatus.php", true); + xhr.onreadystatechange = function() { alert_ajax(xhr, session); }; + + xhr.open("GET", "ram/" + session + "/streamstatus.php", true); xhr.send(null); } -function alert_ajax(xhr) +function alert_ajax(xhr, session) { if (xhr.readyState==4) { @@ -22,7 +22,7 @@ function alert_ajax(xhr) if ( streamstatus == 'error' ) this.location.href = 'error.php'; else - swapPic(); + swapPic(session); } } -- cgit v1.2.3