|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
CALLING THE PRINT DIALOGUE BOX UP FROM A BUTTON
<i><b>Originally posted by : Martin Burford (mburford@hof.co.uk)</b></i><br />I am desperate to find out how to write a function (most probably using JScript) which will call up the print dialogue box. The function will be linked to a button within the web page I am creating as an onclick event trigger, and when pressed, the print box will appear, allowing users to print off that specific page<br /><br />Thanks for your help<br />Martin Burford<br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Shivaji Madhu Sudhanan (shivaji@frontpoint.com)</b></i><br /><html><head><br /><script><br />function printThePage() {<br /> <br /> window.print() ;<br />}<br /></script><br /></head><br /><body><br /><form><br /><input type="button" name="b1" value="Print" onClick="printThePage()"><br /></form><br /></body><br /></html><br /><br />Hope this helps.<br />Regards<br />Shivaji<br />------------<br />Martin Burford at 3/23/2000 8:02:04 AM<br /><br />I am desperate to find out how to write a function (most probably using JScript) which will call up the print dialogue box. The function will be linked to a button within the web page I am creating as an onclick event trigger, and when pressed, the print box will appear, allowing users to print off that specific page<br /><br />Thanks for your help<br />Martin Burford<br />
|
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : Ben Timby (btimby@netdirect.net)</b></i><br />That will work fine in Netscape, but what about the most popular browser, IE?<br /><br />For an example of how to use Javascript, and client-side VBScript to print from BOTH browsers, visit one of the sites that I developed at:<br /><br />http://www.saveetc.com<br /><br />it is a coupon site, just choose a coupon, and you will see a print button, view the source, and steal my code. HTH<br /><br /><br />------------<br />Shivaji Madhu Sudhanan at 4/4/2000 8:26:39 AM<br /><br /><html><head><br /><script><br />function printThePage() {<br /> <br /> window.print() ;<br />}<br /></script><br /></head><br /><body><br /><form><br /><input type="button" name="b1" value="Print" onClick="printThePage()"><br /></form><br /></body><br /></html><br /><br />Hope this helps.<br />Regards<br />Shivaji<br />------------<br />Martin Burford at 3/23/2000 8:02:04 AM<br /><br />I am desperate to find out how to write a function (most probably using JScript) which will call up the print dialogue box. The function will be linked to a button within the web page I am creating as an onclick event trigger, and when pressed, the print box will appear, allowing users to print off that specific page<br /><br />Thanks for your help<br />Martin Burford<br />
|
|
#4
|
|||
|
|||
|
<i><b>Originally posted by : Shivaji Madhu Sudhanan (shivaji@frontpoint.com)</b></i><br /><br />It also works in IE 5.No problem with that.<br />But still Ben's code is very good.Thanks Ben.<br /><br />Shivaji.<br /><br />------------<br />Ben Timby at 4/12/2000 12:35:19 AM<br /><br />That will work fine in Netscape, but what about the most popular browser, IE?<br /><br />For an example of how to use Javascript, and client-side VBScript to print from BOTH browsers, visit one of the sites that I developed at:<br /><br />http://www.saveetc.com<br /><br />it is a coupon site, just choose a coupon, and you will see a print button, view the source, and steal my code. HTH<br /><br /><br />------------<br />Shivaji Madhu Sudhanan at 4/4/2000 8:26:39 AM<br /><br /><html><head><br /><script><br />function printThePage() {<br /> <br /> window.print() ;<br />}<br /></script><br /></head><br /><body><br /><form><br /><input type="button" name="b1" value="Print" onClick="printThePage()"><br /></form><br /></body><br /></html><br /><br />Hope this helps.<br />Regards<br />Shivaji<br />------------<br />Martin Burford at 3/23/2000 8:02:04 AM<br /><br />I am desperate to find out how to write a function (most probably using JScript) which will call up the print dialogue box. The function will be linked to a button within the web page I am creating as an onclick event trigger, and when pressed, the print box will appear, allowing users to print off that specific page<br /><br />Thanks for your help<br />Martin Burford<br />
|
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > CALLING THE PRINT DIALOGUE BOX UP FROM A BUTTON |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|