Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-30-2005, 12:35 AM   PM User | #1
shaweetareek
New Coder

 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
shaweetareek is an unknown quantity at this point
Printing option on a web page

Dear All

First of all, Hello to all of you, as this is my first time to use this forum .

I am designing a web site using Frontpage 2003. I need to make a button or an icon and put it in some pages when you click on it will take you to the printer to print that page. I do not know how to create that, and I will appreciate your help and assistance if you could let me know ho to do it.

Thank you
shaweetareek is offline   Reply With Quote
Old 12-30-2005, 12:42 AM   PM User | #2
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
Welcome to CodingForums.

You can cause the print dialog to come up using javascript. Here is a simple example:

Code:
<input type="button" onclick="window.print()" value="Print" id="PrintBtn" />
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 12-30-2005, 02:10 AM   PM User | #3
shaweetareek
New Coder

 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
shaweetareek is an unknown quantity at this point
Thank you so much oracleguy

That is what exactly I have been looking for !
I was wondering if I can put any image as a small icon instead of the text (PRINT) or not?

Thank you
shaweetareek is offline   Reply With Quote
Old 12-30-2005, 09:10 AM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Code:
<a href="#" onclick="window.print();return false"><img src="yourimage.jpg" alt="" style="border:0"></a>
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 12-31-2005, 01:01 AM   PM User | #5
shaweetareek
New Coder

 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
shaweetareek is an unknown quantity at this point
Any Better one ?

Thank you for both of you guys.

The java code I put it on some pages in the web site, but when I open that page which has contain this script a message comes on the screen say ....To help protect security internet explorer has restircted this file from showing active contact that could access your computer click here for option..... and then if your right click on it then you can select an option as it gives you three options. I was worried that it might be like that to give the same message on most of the computers, and I thought that I should ask you for a better idea.

Thank you
shaweetareek is offline   Reply With Quote
Old 01-01-2006, 04:57 AM   PM User | #6
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Are you testing locally or on a web server? The message should only occur locally but it should go away once the file is on a web server if the script is harmless.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 01-01-2006, 09:21 AM   PM User | #7
shaweetareek
New Coder

 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
shaweetareek is an unknown quantity at this point
I have been testing it for now, but it will be uploaded on the server later. I was worried that it would be the same when it is uploaded on the server, but as you say that it will go away, then that would be good.

Thank you
shaweetareek is offline   Reply With Quote
Old 01-01-2006, 01:50 PM   PM User | #8
mark87
Senior Coder

 
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
mark87 is on a distinguished road
You can turn that off by going to Tools > Internet Options > Advanced Tab > Tick Allow active content to run in files on My Computer.
__________________
markaylward.co.uk
mark87 is offline   Reply With Quote
Old 01-01-2006, 04:31 PM   PM User | #9
shaweetareek
New Coder

 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
shaweetareek is an unknown quantity at this point
Thank you very much Mark87. That was a great solution for that, because it was annoying every time was comeing up, and I had to click on it and allow it myself.
Thank you
shaweetareek is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:15 AM.


Advertisement
Log in to turn off these ads.