ambient reality

pimping code and tech crap

Monday, February 20, 2006

How to print an iframe

To print the contents of an iframe, use this code: <iframe name="myiframe" src="myurl"></iframe> <script> if (!/MSIE 7\./.test(navigator.userAgent)) {     var f = document.all ? window.frames["myiframe"] : myiframe;     f.focus();     f.print(); } else {     alert("IE7 sucks and so do you for using it."); } </script>

0 Comments:

Post a Comment

<< Home