compatibilité IE8 KO , OK sous FF
Bonjour à tous :D
Voilà j'ai une page HTML avec 2 boutons qui permettent de lancer une URL via une image cachée.
Quand je clic sur le btn1, alors l'image chachée change de SRC.
Idem pour le bouton2. Cela me sert à piloter un vidéo serveur Axis.
Oui, sauf que sous FF, ça passe impecc.
Sous IE8, je clic bouton, 1 -> OK
Je clic Bouton2 -> OK
Je reclic Bouton 1 -> Plus rien ne se passe. Sous IE, je peux allumer/éteindre pendant des heures sans soucis :D LoL
Voici le code HTML :
Code:
1 2 3 4 5 6
|
<a href="#" onClick="cam1()"><img src="rouge.gif" id="led1" title="Choix caméra 1" /></a>
<a href="#" onClick="cam2()"><img src="rouge.gif" id="led2" title="Choix caméra 2" /></a>
<p><img src="" id="fake1" style="visibility:hidden" /></p>
<p><img src="" id="fake2" style="visibility:hidden" /></p> |
Voici le code Javascript :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
/************************************/
/* Choix Caméra 1 - CODE 0 0 0 1 */
/************************************/
function cam1(){
pic1=document.getElementById('fake1');
pic2=document.getElementById('fake2');
lampe1=document.getElementById('led1');
lampe2=document.getElementById('led2');
image = document.getElementById('led1').getAttribute("src");
if (image.match('rouge.gif')){
pic1.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=1:\\'
pic2.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=2:\\'
lampe1.src='vert.gif'
lampe2.src='rouge.gif'
}
if (image.match('vert.gif')){
pic1.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=1:\\'
pic2.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=2:\\'
lampe1.src='rouge.gif'
lampe2.src='rouge.gif'
}
}
/************************************/
/* Choix Caméra 2 - CODE 0 0 1 0 */
/************************************/
function cam2(){
pic1=document.getElementById('fake1');
pic2=document.getElementById('fake2');
lampe1=document.getElementById('led1');
lampe2=document.getElementById('led2');
image = document.getElementById('led2').getAttribute("src");
if (image.match('rouge.gif')){
pic1.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=1:\\'
pic2.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=2:\\'
lampe1.src='rouge.gif'
lampe2.src='vert.gif'
}
if (image.match('vert.gif')){
pic1.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=1:\\'
pic2.src='http://192.168.0.11/axis-cgi/io/output.cgi?action=2:\\'
lampe1.src='rouge.gif'
lampe2.src='rouge.gif'
}
} |
Avez-vous une idée? Merci :ccool: