/    Sign up×
Community /Pin to ProfileBookmark

iFrames and printing

How can I get it so that when I print a page in an iFrame, it prints what it’s the frame (excluding the frame itself) but shows the URL of the frame and not the actual source of what’s inside the frame. I have a cheesey script below to show what I am trying to do…

Frame source:
<html>
<iframe frameborder=”0″ marginheight=”0″ marginwidth=”0″ height=”100%” width=”100%” src=”simple main.html” scolling=”no” name=”main” framespacing=”0″>
</iframe>
</html>

Target source:
<html>
<body onContextMenu=”return false;”>
<a onclick=”window.print();return false” href=”#”>Print this page</a>
<center><b>This is garbage</b></center>
</body>
</html>

Any ideas?

Thanks!

Tom

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@BrainDonorauthorJun 20.2003 — Perfect. Thanks Dave!

Tom
×

Success!

Help @BrainDonor 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,
)...