diff options
author | root <root@mediaserver.Belkin> | 2010-02-17 23:14:37 +0100 |
---|---|---|
committer | root <root@mediaserver.Belkin> | 2010-02-17 23:14:37 +0100 |
commit | f27608f2695d51f563adb6ebc8c475c6a8df53ba (patch) | |
tree | c1a909a310b10f267221029e3ba50462dbd3a63f /javascript | |
download | istreamdev-f27608f2695d51f563adb6ebc8c475c6a8df53ba.tar.gz istreamdev-f27608f2695d51f563adb6ebc8c475c6a8df53ba.tar.bz2 |
0.3.5-dev
Diffstat (limited to 'javascript')
-rwxr-xr-x | javascript/ajax.js | 27 | ||||
-rwxr-xr-x | javascript/developer-functions.js | 24 | ||||
-rwxr-xr-x | javascript/functions.js | 1 |
3 files changed, 52 insertions, 0 deletions
diff --git a/javascript/ajax.js b/javascript/ajax.js new file mode 100755 index 0000000..7ccafe2 --- /dev/null +++ b/javascript/ajax.js @@ -0,0 +1,27 @@ +function ajax() +{ + 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.send(null); +} + +function alert_ajax(xhr) +{ + 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' ) + this.location.href = 'error.php'; + else + swapPic(); + } +} diff --git a/javascript/developer-functions.js b/javascript/developer-functions.js new file mode 100755 index 0000000..244c900 --- /dev/null +++ b/javascript/developer-functions.js @@ -0,0 +1,24 @@ +function fullscreen() {
+ var a = document.getElementsByTagName("a");
+ for (var i = 0; i < a.length;i++) {
+ if (a[i].className.match("noeffect")) {
+ }
+ else {
+ a[i].onclick = function () {
+ window.location = this.getAttribute("href");
+ return false;
+ };
+ }
+ }
+}
+
+function hideURLbar() {
+ window.scrollTo(0, 0.9);
+}
+
+
+window.onload = function () {
+ fullscreen();
+ hideURLbar();
+};
+
diff --git a/javascript/functions.js b/javascript/functions.js new file mode 100755 index 0000000..65d0f2f --- /dev/null +++ b/javascript/functions.js @@ -0,0 +1 @@ +function fullscreen(){var a=document.getElementsByTagName("a");for(var i=0;i<a.length;i++){if(a[i].className.match("noeffect")){}else{a[i].onclick=function(){window.location=this.getAttribute("href");return false}}}}function hideURLbar(){window.scrollTo(0,0.9)}window.onload=function(){fullscreen();hideURLbar()};
\ No newline at end of file |