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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Some javascript works with IE and Opera but not mozilla

Status
Not open for further replies.

iXPhound

Technical User
Feb 25, 2001
146
US
Hi all,

Hope someone can help a newb to web development.

I am using a table and have a field
<td colspan="13">
<a href="#"
onclick="changeBanner();">
<img name="Banner" src="images/Banner0.gif" width="658"height="102" border="0" alt=""/>
</a>
</td>

The changeBanner function is simply:

var i = 0;
function changeBanner()
{
if (i >= 0 && i < 7)
{
i+=1;
Banner.src = "images/Banner" + i + ".gif";
}
else
{
i=0;
Banner.src = "images/Banner" + i + ".gif";
}
}

This is probably a bad way of doing things (not really sure because I am still learning) but it works fine in IE and Opera but will not work in Mozilla FireFox 1.0 or Mozilla 1.75.

Any suggestions are greatly appreciated.

TIA!!!!
 
thank you, wasn't sure if the problem was one the other or a little of both!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top