View Single Post
  #2  
Old 08-22-2007, 04:32 AM
GDevakii GDevakii is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 125
GDevakii is on a distinguished road
Default Re: how to print iframe pdf document using file print menu using javascript

<HTML>
<HEAD>
<SCRIPT>
var frameSrc = '';
frameSrc += '<HTML><BODY>';
frameSrc += '<BUTTON ONCLICK="alert(\'Kibology\');">';
frameSrc += 'button<\/BUTTON>';
frameSrc += '<\/BODY><\/HTML>';
var iframeWin, iframeElement;
function init () {
iframeWin = window.frames.anIframe;
iframeWin.document.open();
iframeWin.document.write(frameSrc);
iframeWin.document.close();
iframeElement =
document.getElementById ?
document.getElementById('anIframe') :
document.all['anIframe'];
}
</SCRIPT>


</HEAD>
<BODY ONLOAD="init();">
<A HREF="javascript: alert
(iframeWin.document.body.firstChild.nodeName); void 0">
show iframe first child
</A>
|
<A HREF="javascript: iframeElement.width = 300; void 0">
set width to 300
</A>
<BR>
<IFRAME ID="anIframe" NAME="anIframe" SRC="about:blank" WIDTH="100">
</IFRAME>
</BODY>
</HTML>
Reply With Quote