For some reason I cant target my IFrame called "maincontent". I tried maincontent.print(), but it still prints the whole index page.
Is there an easy way to "capture" the page address in the IFrame called "maincontent", and then open a new page with only that page to make it easy to print?
Thanx in advance
Solution to make printer-friendly print of IFrame's content
Moderator: General Moderators
Haven't done serious Javascript in a long while, but have you tried
Code: Select all
document.maincontent.document.print()- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
to "capture" the page:I'm betting you can figure out how to open a new window from there to call print on..
Code: Select all
window.document.maincontent.document.location.href