J
JJ
Hi
I have 4 frames in a page, and I am looking to print the contents of one of
the frames, with a Print button on another frame.
Murray had posted the following code as an answer to question. I used it and
is good to print the contents of the page with the button.
The question is what should I change to make it print a page on a particular
frame.
If there is another way to do this, I am ok too.
Thanks for the help.
**************here is the code***********
At the top of the page define this script
<script type="text/javascript">
function print_page(where){
var is_mac=(navigator.platform.indexOf("ac") != -1);
(document.all && is_mac)?
alert("Select \"Print\" from the menu") : where? where.window.print() :
window.print();
}
</script>
In the body include the following statement
<button onClick="print_page()">Print Page</button>
I have 4 frames in a page, and I am looking to print the contents of one of
the frames, with a Print button on another frame.
Murray had posted the following code as an answer to question. I used it and
is good to print the contents of the page with the button.
The question is what should I change to make it print a page on a particular
frame.
If there is another way to do this, I am ok too.
Thanks for the help.
**************here is the code***********
At the top of the page define this script
<script type="text/javascript">
function print_page(where){
var is_mac=(navigator.platform.indexOf("ac") != -1);
(document.all && is_mac)?
alert("Select \"Print\" from the menu") : where? where.window.print() :
window.print();
}
</script>
In the body include the following statement
<button onClick="print_page()">Print Page</button>