PDA

View Full Version : Why is my script not working on IE?


jerry2
06-18-2005, 03:33 PM
Hi there

To my horror, the show/hide script is not working on IE partly. When you click on the enlarging glass in Opera and Firefor you get a minus sign enlarging glass picture to close the selection. In IE you only get error and invisible link :-(((

Is anybody so kind to try it:

http://www.debora.si/najhrana/strocnice.html

Click on the enlargment glass picture in Opera/Firefor and then in IE :-( There seem to be some error in this tag: document.getElementById(imgX).src. I don't understand why it is working 100% in other browsers :-(

The code in javascript.js is this:


imageX1='plus';
imageX2='plus';
imageX3='plus';
imageX4='plus';
imageX5='plus';
imageX6='plus';
imageX7='plus';
imageX8='plus';
imageX9='plus';
imageX10='plus';
imageX11='plus';
imageX12='plus';

function toggleDisplay(e){
imgX="slika"+e;
tableX="tabela"+e;
imageX="imageX"+e;
tableLink="tabelaHref"+e;
imageXval=eval("imageX"+e);
element = document.getElementById(tableX).style;
if (element.display=='none') {element.display='block';}
else {element.display='none';}
if (imageXval=='plus') {document.getElementById(imgX).src='images/lupa1a.gif';eval("imageX"+e+"='minus';");document.getElementById(tableLink).title='Skrij podrobnosti';}
else {document.getElementById(imgX).src='images/lupa1.gif';eval("imageX"+e+"='plus';");document.getElementById(tableLink).title='Prikaži več';}
}


I thank you for any help.

Yours

Jerry

Willy Duitt
06-19-2005, 05:12 PM
What's the MickeyMouse return value?? I don't see it in your script but you are calling it from your image map... Those two functions appear to be conflicting with each other... And the script you posted above is not the script you are using on your page...