OnPrint?

Javascript coding ..

Moderators: macek, egami, gesf

User avatar
gorshing
New php-forum User
New php-forum User
Posts: 12
Joined: Thu Dec 05, 2002 5:56 pm
Location: Oklahoma, US
Contact:

OnPrint?

Postby gorshing » Tue Feb 25, 2003 12:12 pm

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,

astro_sk
New php-forum User
New php-forum User
Posts: 8
Joined: Sun Oct 13, 2002 5:00 pm
Location: Brasil

Re: OnPrint?

Postby astro_sk » Thu Aug 28, 2003 5:56 am

gorshing wrote: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.

cw4908
New php-forum User
New php-forum User
Posts: 5
Joined: Sun Aug 31, 2003 3:06 am
Contact:

Postby cw4908 » Sun Aug 31, 2003 9:56 pm

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


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 0 guests