Print Question

H

Hermione

Hi,

I use Front page 2003

In my page I have :

1 - Inline Frame which contains all the information
2 - a Print Button

I want to let the user to be able to print the content of the inline Frame
when hw click on the Print Button

Thanks in advance for your help
 
K

Kevin Spencer

JavaScript: window.print();

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
H

Hermione

Hi Kevin

Thanks for your answer, but how can I specify that I want to print the
contains of the inline frame, the print bottom is on the main page

Thanks
 
K

Kevin Spencer

With an iFrame, you will have to put the button in the iFrame.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
M

Murray

And it will fail on Macs with IE5. Here's the best you can do as far as I
know -

Put this in the head of the IFrame document -

<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>

Put this in the body of the IFrame document -

<a href="javascript:print_page()">Print this</a>
 
H

Hermione

Hi Murray

I cannot put this code in the head of a inline frame, a inline frame doesn't
have head as I know

Any help please

Thanks
 
R

Ronx

The page that displays in the IFrame (the "IFrame document") *does* have a
<head> section.

I can see both interpretations of Murray's phrase :)
 
M

Murray

Heh - that's the ticket.

--
Murray

Ronx said:
The page that displays in the IFrame (the "IFrame document") *does* have a
<head> section.

I can see both interpretations of Murray's phrase :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top