Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Nov 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Does firefox use iframe?

    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?

    Code:
    <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..?

  • #2
    New Coder
    Join Date
    Mar 2005
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    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.
    Code:
    <!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.
    Code:
    <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.
    Last edited by Bill Posters; 11-26-2005 at 11:54 AM.

  • #4
    New Coder
    Join Date
    Nov 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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"...

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Yeah I see it just fine. FF 1.0.7 for PC.

  • #6
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by Josh01
    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'.)

  • #7
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    This doesn't have anything to do with PHP so I will move it to the HTML forum.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #8
    Regular Coder KevinG's Avatar
    Join Date
    Aug 2002
    Location
    The Matrix
    Posts
    405
    Thanks
    3
    Thanked 0 Times in 0 Posts
    man, that navigation scared the gonads off of me - 23.29pm, half asleep forgot pc volume was up full blast

  • #9
    New Coder
    Join Date
    Nov 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by KevinG
    man, that navigation scared the gonads off of me - 23.29pm, half asleep forgot pc volume was up full blast

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

  • #10
    New Coder
    Join Date
    Nov 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Spookster
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •