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!

cancelling print command

Status
Not open for further replies.

mgriffith

MIS
Jul 3, 2001
177
US
any idea on how to cancel someone from printing

i've tried

function window.onbeforeprint()
{
event.returnValue = false;
return false;
}

function window.onkeyup()
{
if (event.keycode==17) //ctrl
{
event.returnValue = false;
return false;
}
}


how do i capture them pressing ctrl+p? i can only get ctrl..but if they hold it in and press p, this does nothing...however there are input boxes on the page so i can't cancel the p alone.

i can disable the context menu and title bar too (i only have to support ie5+), but i need to shut them off from trying to hit ctrl+p.

thanks in advance. mike griffith
----------------------------
mgriffith@lauren.com
mdg12@po.cwru.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top