Forum Moderators: open
I am wondering if anyone can tell me why when I load a HTML page that contains the code below, the script alert is fired 3 times and the IFRAME appears to load 3 times in Firefox.
I have tested on Firefox 1.0.4 and I have this problem.
IE only renders the frame and alert once, and Netscape 7.2 also has no trouble with this page.
It is just Firefox!
<html>
<head>
<title>Sample IFRAME</title>
<script type="text/javascript">
alert("script called:" + new Date());
</script>
</head>
<body>
<iframe name="google_ads_frame" src="http://www.google.com" frameborder="1" height="300" scrolling="yes" width="300"><img></iframe>
</body>
</html>
NOTE: I have also tried to use an onload function for the alert, and it is also called 3 times.
Any help is appreciated!
and Welcome to WebmasterWorld!
Im afraid that when I try that code in my FireFox 1.0.4 it only shows the alert once. (Same in IE).
Is it possible you have some software running in the background checking out any javascript code before it allows it to fire! Anti-virus or something - this is just a (very)wild guess though!
Cheers
I disabled Microsoft AntiSpyware and Norton Anitivirus and then I only got 1 alert. I did restart my machine so those apps were running and that test page was only loading once.
So all is well, although I feel a little uneasy as to why this problem was occuring. I had been developing and testing a website on Firefox so maybe I wrote some bad HTML which caused something to break inside of it?
I don't really know. Thanks for your help.