I have a small function that I use to change an image when a hyperlink is click.
This code works 100% for IE6 and IE5.5 but I get an error when I try access the page in IE5.
The error says "Invalid Character line 323"
Here is my code
function ResetImages(tLevel)
{
var original = "/Images/MenuActive.gif";
var substitute = "/Images/MenuInActive.gif";
if(document.images)// make sure the browser supports on-line image changing
{
for(var i=0; i < document.images.length; i++)
{
var imageString = document.images.src.toString();
if(imageString.indexOf(original) != -1 && document.images.name != tLevel)
{
document.images.src = substitute;
} <----------- Line 323
} // Move on to the next image
} // Ends the check to make sure image swapping is Supported
}
Thanks,
Gavin
This code works 100% for IE6 and IE5.5 but I get an error when I try access the page in IE5.
The error says "Invalid Character line 323"
Here is my code
function ResetImages(tLevel)
{
var original = "/Images/MenuActive.gif";
var substitute = "/Images/MenuInActive.gif";
if(document.images)// make sure the browser supports on-line image changing
{
for(var i=0; i < document.images.length; i++)
{
var imageString = document.images.src.toString();
if(imageString.indexOf(original) != -1 && document.images.name != tLevel)
{
document.images.src = substitute;
} <----------- Line 323
} // Move on to the next image
} // Ends the check to make sure image swapping is Supported
}
Thanks,
Gavin