If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How to print the page on popup window

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-04, 15:25
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
How to print the page on popup window

On my ASP page on a popup window without tool bars, I would like to have a button to let the user print the page. How can I do it? Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 08-04-04, 19:31
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
you should be able to put a button there that calls some javascript. I think the function is window.print(); but I can't be sure.
Reply With Quote
  #3 (permalink)  
Old 08-04-04, 20:21
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
To make the print dialog automatically pop, put an OnLoad function in your Body tag that calls a function. That function would look similar to:
Code:
function printWin(){
  window.print();
  window.focus();
  window.close();
}
There was some reason why the print function had to come first, but I can't for the life of me remember why.. *shrug*
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On