/    Sign up×
Community /Pin to ProfileBookmark

Removing data in an Iframe

I have a document on another page that I would like to include in an Iframe however i don’t want the header or footer of the other page included in my page. Is there any way to tell an iframe to include from a certain point or is there any other way to accomplish this. Thank you very much.

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@boxxertrumpsApr 12.2007 — not with an iframe. You'd want either php or ajax
Copy linkTweet thisAlerts:
@luvv2rockauthorApr 13.2007 — can you explain how to do this with either php or ajax? I would much appreciate it.
Copy linkTweet thisAlerts:
@boxxertrumpsApr 14.2007 — uhhh...

[code=php]<?php
$info=file_get_contents("URL of included page");
$bad=array(
'The code of the header...',
'The code of the footer'
);
echo str_replace($bad,"",$info);
?>[/code]
Copy linkTweet thisAlerts:
@RkaderApr 14.2007 — This may also work in just HTML

This is in the <head>:

<base target="[i]ID of Iframe[/i]"; href="[i]file with the information[/i]"; >

in <body>

<iframe name="[i]ID[/i]" width="565" height="264" align="center" scrolling="no" ></iframe>

then the file reference:

<p><a href="#whatever"><font size="2">*name</font></a>

You should ID the info you want in the IFrame.
×

Success!

Help @luvv2rock spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...