...

View Full Version : Does firefox use iframe?



Josh01
11-26-2005, 09:26 AM
Hey, I am adding an add to my site. But when I do, it only shows up with internet explorer not mozilla firefox... Doesn't firefox accept iframe?


<iframe frameborder="0" width="468" height="60" marginwidth="0" marginheight="0" scrolling="no" src="http://4.adbrite.com/mb/banner.php?***********">
<script type="text/javascript" src="http://4.adbrite.com/mb/banner.php?***********"></script>
</iframe>
<p /><div><a class="adHeadline" target="_top" href="http://www.adbrite.com/mb/commerce/************">Your Ad Here</a></div>

Does anyone know a different way to write this, so that firefox and IE will both accept it..?

Extreme43
11-26-2005, 11:14 AM
Iframes definantly do work in firefox.
the javascript inside the <iframe></iframe> only shows when the iframe cannot be displayed. as far as i know, i dont really use iframes.
hope that helps.

Bill Posters
11-26-2005, 11:43 AM
FF simply isn't recognising the contents of the src file as script, let alone javascript.
It's probably right/strict as there's nothing to actually tell the browser that the contents of the src file are javascript. i.e. it has no script elements, no script type content element and no js file name suffix.

You might consider turning the src file into a basic page which contains just the minimum markup and the javascript.

e.g.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ad page</title>
<style type="text/css">

body {
margin: 0;
padding: 0;
}

</style>
</head>
<body>

<div>
<a target="_top" href="http://click.adbrite.com/mb/click.php?sid=0&amp;banner_id=0&amp;cpc=&amp;ssc=b5d4127c170b114f6d84d06ec4387744"><img src="http://files.adbrite.com/mb/banners/default_ad.gif" border="0" alt=""></a>
</div>

</body>
</html>

Altrnatively, it may be sufficient to simply wrap the javascript in script elements.
So the src document would contain only the following code.

e.g.

<script type="text/javascript">
document.write('<a target="_top" href="http://click.adbrite.com/mb/click.php?sid=0&banner_id=0&cpc=&ssc=b5d4127c170b114f6d84d06ec4387744"><img src="http://files.adbrite.com/mb/banners/default_ad.gif" border="0" alt=""></a>');
</script>

Personally, unless there's a problem in doing so, I'd use a basic, but complete document structure to contain the js.

Josh01
11-29-2005, 04:48 AM
Thanks Bill and everyone. I tried a few methods. Then I realized it was working for other people in firefox. So I stuck with the original code. Does everyone else see it? http://nemosurf.com Down the bottom of the page, a banner should say "YOUR ADD HERE"...

_Aerospace_Eng_
11-29-2005, 04:54 AM
Yeah I see it just fine. FF 1.0.7 for PC.

Bill Posters
11-29-2005, 09:11 AM
a banner should say "YOUR ADD HERE"...
I imagine it should say "YOUR AD HERE". ;)
(i.e. when abbreviating advert, it's 'ad', not 'add'.)

Spookster
11-29-2005, 02:14 PM
This doesn't have anything to do with PHP so I will move it to the HTML forum.

KevinG
11-29-2005, 11:33 PM
man, that navigation scared the gonads off of me - 23.29pm, half asleep forgot pc volume was up full blast :eek:

Josh01
12-01-2005, 02:07 AM
man, that navigation scared the gonads off of me - 23.29pm, half asleep forgot pc volume was up full blast :eek:


LOL lmfao. Yeah, I am thinking of removing the flash. I think it takes alot of bandwidth.

Josh01
12-01-2005, 05:22 AM
This doesn't have anything to do with PHP so I will move it to the HTML forum.

Yes that code above was for a php file.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum