Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making a "print" button

Status
Not open for further replies.

OhioSteve

MIS
Mar 12, 2002
1,352
US
How do I make a button that performs a standard windows function such as save, close, or print? I am especially interested in a button that will send the current page to print preview.

I once wrote some VB for MS Access that used a function called "sendkeys(value)". It could send the equivalent of a keystroke, so you could send a "ctrl-P". Is that a possibility here?
 
<input type=button value=&quot;Print&quot; onClick=&quot;window.print()&quot;>
<input type=button value=&quot;Print&quot; onClick=&quot;window.close()&quot;>
This is from the JScript Forum. Check there using the search for save.

DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top