Log in

View Full Version : Having an issue with IFrames



Vic7332
10-12-2007, 01:57 PM
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.

boogyman
10-12-2007, 02:13 PM
what do you mean top logo? like on the new page that is being parsed in the iframe?

jscheuer1
10-12-2007, 04:16 PM
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.

Vic7332
10-12-2007, 04:49 PM
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.

Vic7332
10-12-2007, 04:49 PM
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.

jscheuer1
10-12-2007, 07:08 PM
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:


<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:


<div id="logo"><img src="logo.gif"></div>

djr33
10-12-2007, 10:15 PM
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