diff options
author | Alib <aliboba@free.fr> | 2010-03-15 17:56:22 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-15 17:56:22 +0100 |
commit | 438912c0c4a4075a5cd74cf9689451c9df4bbe34 (patch) | |
tree | 334e03bbba01b002a34d3cbf81ee7e600ec7bff6 /javascript/ajax.js | |
parent | a8012963c23e7e5eaf487ee9e192ae5c4d4ccff2 (diff) | |
download | istreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.gz istreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.bz2 |
New Jquery branch. Initial development version for istreamdev 1.0
Diffstat (limited to 'javascript/ajax.js')
-rwxr-xr-x | javascript/ajax.js | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/javascript/ajax.js b/javascript/ajax.js deleted file mode 100755 index 9b5db5e..0000000 --- a/javascript/ajax.js +++ /dev/null @@ -1,61 +0,0 @@ -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, session); }; - - xhr.open("GET", "streamstatus.php?session=" + session, true); - xhr.send(null); -} - -function alert_ajax(xhr, session) -{ - if (xhr.readyState==4) - { - var docXML= xhr.responseXML; - var streamstatus = null; - var items = docXML.getElementsByTagName("streamstatus"); - streamstatus = items.item(0).firstChild.data; - if ( streamstatus == 'error' ) { - var items2 = docXML.getElementsByTagName("message"); - var errmessage = items2.item(0).firstChild.data; - errorMsg(errmessage); - } - else - swapPic(session); - } -} - -function playmusic(path,name) -{ - var xhr=null; - - xhr = new XMLHttpRequest(); - //on définit l'appel de la fonction au retour serveur - xhr.onreadystatechange = function() { openpls(xhr); }; - encpath=escape(path); - encname=escape(name); - xhr.open("GET", "genplaylist.php?path=" + encpath + "&name=" + encname, false); - xhr.send(null); - -} - -function openpls(xhr) -{ - if (xhr.readyState==4) - { - var docXML= xhr.responseXML; - var streamstatus = null; - var items = docXML.getElementsByTagName("m3u") - - streamstatus = items.item(0).firstChild.data; - if ( streamstatus == 'error' ) { - this.location.href = 'error.php'; - } - - //this.location.href = 'playlist/playlist.m3u'; - //document.s1.Play(); - } -} |