OnPrint?

A

Anonymous

Guest
I am wanting to capture when somebody wants to print. So instead of printing my page they will print either another html file, or word doc, or pdf file.

It seems like I did this a few years ago but know I can't remember how and can't find anything on the net.

Thanks,
 
gorshing said:
I am wanting to capture when somebody wants to print. So instead of printing my page they will print either another html file, or word doc, or pdf file.

It seems like I did this a few years ago but know I can't remember how and can't find anything on the net.

Thanks,

in most cases its done by taking you to another page with just the text and then the person can print from their.
the trick is to use includes in your pages so that you can easily link to the raw text. That way you don't have to create another html page.
 
To do this without sending them to the other page is somewhat complicated. Info, samples (you'll need to look into the samples' HTML with view source, and grab the refered-to .js files becuase Microsoft doesn't show them to you :twisted: ) can be found at http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnscrpt/html/dhtmlprint.asp . This works in all OP/IE/NS current browsers I believe, but have not tried it in all three yet (Call me LAZY :arrow: :wink: )
 
Back
Top