Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Please Help !! (http://www.velocityreviews.com/forums/t918240-please-help.html)

Melba 05-23-2005 09:43 PM

Please Help !!
 
Hi everybody !!
I need to know when my HTML page is being printed.
I know there are some events (onbeforeprint and onafterprint), but they
are firing befor the printing and if someone cancels the printing i can
not know that.

Please Help me !!

Thanks
Tamara.


RobG 05-23-2005 11:59 PM

Re: Please Help !!
 
Melba wrote:
> Hi everybody !!
> I need to know when my HTML page is being printed.


You absolutely can't reliably determine when (or if) your page is being
(or has been) printed using JavaScript. Even if the user's browser
supports the methods you are using, they may have JavaScript turned
off, or may be using some other application to display and print your
page. :-(

> I know there are some events (onbeforeprint and onafterprint), but they
> are firing befor the printing


onafterprint is defined by Microsoft as:

"Fires on the object immediately after its associated document prints
or previews for printing"

<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onafterprint.asp>

If that is not happening, then talk to Microsoft.

> and if someone cancels the printing i can
> not know that.


Those two events are Microsoft proprietary events, there is no public
standard and likely poor support outside Windows/IE. Firefox does not
support them. You will likely rarely 'know that'.

>
> Please Help me !!


A useful and informative subject will assist in getting help more
readily. :-)

>
> Thanks
> Tamara.
>



--
Rob

John 05-24-2005 01:23 PM

Re: Please Help !!
 
"Melba" <tdblum@hotmail.com> wrote in message
news:1116884584.179625.252270@g43g2000cwa.googlegr oups.com...
> Hi everybody !!
> I need to know when my HTML page is being printed.
> I know there are some events (onbeforeprint and onafterprint), but they
> are firing befor the printing and if someone cancels the printing i can
> not know that.


May I ask why you need this?

There may be another solution.

For example; if you have printer specific formating, you can probably handle
it in CSS, or if you are trying to track who is printing what, you may be
able to handle it via a seperate "printable" page which is assumed to be
printed every time it is loaded.

Regards,
John MacIntyre
http://www.johnmacintyre.ca
Specializing in; Database, Web-Applications, and Windows Software




All times are GMT. The time now is 04:26 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.