By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,602 Members | 1,473 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,602 IT Pros & Developers. It's quick & easy.

Ad rotator driving mozilla/netscape wiggy

P: n/a
I have a simple ad rotator that's driving mozilla and netscape a
little crazy. You know that symbol in the upper right corner of the
browser that animates while a page is downloading and is supposed to
stop once the page is loaded? Well, after my rotate() function is
called the animation starts and stops randomly as I move the mouse
around the page over various other links.
This only happens in Netscape and Mozilla firefox.
Did I do something nonstandard or is this an idiosyncrasy/bug/feature
in the mozilla engine?

Here's the javascript function:
function rotate()
{
numAds=8
adNum = Math.ceil(Math.random()*numAds);
frames['ads'].location.href="/ads/fullbanner/ad"+adNum+"/ad.html";
}

where frames['ads'] is this iframe.
<iframe name=ads id=ads src='/ads/fullbanner/ad1/ad.html' width=468
height=60 marginwidth=0 marginheight=0 frameborder=0 hspace=0 vspace=0
border=0 scrolling=no>Cant do inline frames.</iframe>

There's not much to the html thats being loaded into this iframe.
Here's one of the files:
<html>
<head></head>
<body>
<center>
<a target="_top" href="http://www.blah.com">
<img border=0 name="ad1" width=468 height=60
src="/ads/fullbanner/ad1/blah.jpg"></a>
</center>
</body>
</html>
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
JRS: In article <29************************@posting.google.com>, dated
Mon, 20 Sep 2004 21:42:43, seen in news:comp.lang.javascript, apchar
<ap****@yahoo.com> posted :

Don't post the same article twice within three hours.
adNum = Math.ceil(Math.random()*numAds);


Incorrect; see newsgroup FAQ.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.