Hi guys,
I am currently developing a
js slideshow. I have uploaded the page to the following URL, so hopefuly you can help me out.
http://www.freewaymedical.co.uk/prot...testonWeb.html
Please go here and view source to troubleshoot.
It does take a while to load as I have lots of mods to make before the live version. Your patience here is appreciated.
The problem is that the code works fine in IE6, that is all the slideshows work. However when I load it up in any other browser (have actually tried Mozilla, Firefox and Netscape. All latest versions) the first slideshow does not seem to change the image, but the other 4 slideshows work fine??
I can't understand it as I generate the code dynamically with
PHP and
js, so in theory they should all work the same.
I have opened the file with Mozilla's javascript debugger (Venkman) and stepped through it. It seems to just exit the following function on the part marked <!--exits here->> without executing it or the following lines. This is really confusing as there is no error message or exception raised, it just stops executing the function.
Stepping through this on any of the other slideshows executes all lines as expected.
- Code: Select all
function slideshowUp(n)
{
switch(n)
{
case 'char': {charnum++}; break
case 'room': {roomnum++};break
case 'stor': {stornum++}; break
case 'vari': {varinum++}; break
case 'resu': {resunum++}; break
default: alert("an error has occurred, please refresh the page and try again");
}
var determineImg="if ("+n+"num=="+n+"NumMax){"+n+"num=min}";
eval(determineImg);
var newImage="document."+n+".src="+n+"Pics["+n+"num].src";
//get the new width
var newHeight=resizeGetSize(n, "h");
//get the new height
var newWidth=resizeGetSize(n, "w");
//document.char.height=newHeight
<!--exits here
eval("document."+n+".height="+newHeight);
->>
eval("document."+n+".width="+newWidth);
eval(newImage);
Please help as I am completely stumped!