Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Please Help !!

Reply
Thread Tools

Please Help !!

 
 
Melba
Guest
Posts: n/a
 
      05-23-2005
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.

 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      05-23-2005
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
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      05-24-2005
"Melba" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please please please help this guy with his open source java app casioculture@gmail.com Java 4 05-05-2005 08:24 AM
Console profile for Windows app in VC++ - PLEASE PLEASE PLEASE HELP! MuZZy C++ 7 01-07-2005 08:40 PM
Computer problems please please please help Nick Computer Support 0 06-04-2004 08:49 PM
HELP! HELP! PLEASE, PLEASE, PLEASE tpg comcntr Computer Support 11 02-15-2004 06:22 PM
please help... ...me learn C++ please please please :) KK C++ 2 10-14-2003 02:08 PM



Advertisments