summaryrefslogtreecommitdiff
path: root/javascript/ajax.js
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-27 02:12:43 +0100
committerTheTroll <trolldev@gmail.com>2010-02-27 02:12:43 +0100
commit32b78254c76ebd9a07ad19edf25f1f0846a33bb8 (patch)
treed517c7bef969a6498d40fb64106c41363cfc36f7 /javascript/ajax.js
parent0c9414a9fecf2278d468acb1cf184e776b5a15c7 (diff)
downloadistreamdev-32b78254c76ebd9a07ad19edf25f1f0846a33bb8.tar.gz
istreamdev-32b78254c76ebd9a07ad19edf25f1f0846a33bb8.tar.bz2
Sessions WIP
Diffstat (limited to 'javascript/ajax.js')
-rwxr-xr-xjavascript/ajax.js14
1 files changed, 7 insertions, 7 deletions
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);
}
}