Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid character?

Status
Not open for further replies.

Mannga

Programmer
Jun 21, 2002
85
GB
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
 

please post the whole code or the link to illustrate better...

- g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top