Results 1 to 7 of 7

Thread: Having an issue with IFrames

  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Having an issue with IFrames

    I have the code to put in an IFrame to embed a website into my page, but I need to be able to take off the top logo of the website while keeping the rest of the content underneath it for my web page. I've searched everywhere but cannot find an answer to this dilemma.

    Current IFrame code I am using, realizing it is missing a piece:<iframe name= src ="http://websitename.com" width="1000" height="1000" scrolling="no"></iframe>

    Any help would be appreciated. Thanks.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    what do you mean top logo? like on the new page that is being parsed in the iframe?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In many cases that would constitute theft of content and/or a violation of the TOS of the other site. If either is true in this case, we aren't permitted to help you due to the TOS of this forum.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the quick response.

    I need to not show/hide the top banner and navigation bar of the web page I am embedding into my webpage. Taking only the main content and the bottom information. Hopefully that makes sense.

  5. #5
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your concern. The website I am putting in this webpage is another website that I own. I do realize the legal ramifications of taking information without permission from another website and would never go there.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you own both pages, the remote page could be redesigned without the unwanted logo. The logo could still appear on that page via its being presented on that site in an iframe under its logo. When it is used as a remote page, it would no longer have this logo.

    Another alternative would be via javascript. This would of course not work for those few users without javascript enabled. You could have a script in the head of the remote page:

    Code:
    <script type="text/javascript">
    if (top.location!=location.href)
    document.write('<style type="text/css">#logo {display:none;}<\/style>')
    </script>
    Give the logo or its container the id of 'logo', ex:

    HTML Code:
    <div id="logo"><img src="logo.gif"></div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You could also use a server side script to isolate the offending code and remove it, then output the rest, but that would be a complex answer.

    If you want the logo removed only when included in an iframe, you can use PHP or another server side language like so:
    <?php if (isset($_GET['included'])) { echo 'display:none'; } ?>, and have that change the stylesheet.
    That will be true if the url is .../dir/yourpage.php?included
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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