Forum Moderators: open
<body>
<iframe name="theiframe" id="theiframe" width="500" height="200" src="some.file"></iframe>
<input type="button" value="print IFRAME" onclick="iprint(theiframe);" />
</body>
I need a script that, instead of printing, opens the iframe-text in a new window (actually a new page).
<script type="text/javascript">
function iprint(ptarget){
window.open(document.getElementById(ptarget).src)
}
</script><body>
<iframe name="theiframe" id="theiframe" width="500" height="200" src="some.file"></iframe>
<input type="button" value="print IFRAME" onclick="iprint('theiframe');" />
</body>
returns
Error:'self.window[...].document.body' is null or not an object