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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.print()

Status
Not open for further replies.

qwe1204

Programmer
Aug 30, 2001
21
GB
Using the window.print I get the print dialogue box. Is there anyway to prevent this. The application is an intranet application and WILL NOT be used outside this company.
 
No way, regardless of whether its an intranet or not, giving access to the printer without a dialog would be rude, how would you like it if some code on a website accidentally (or intentionally) sent pages and pages of gunk to your printer without you knowing, it can get real messy without that dialog
 
In no way do I disagree with sjravee's assessment.

However, in possible defense of qwe1204's question, I was asked for similar functionality by my users. I agreed with the users that if such functionality were possible, it would have been a beneficial enhancement to the application.
 
you may be able to get around this by making your app into an .hta - though I'm only basing this on the fact that hta's can do more restricted things like create modal dialogs with no chrome...I've never created an hta myself (yet)
 
If you check out other threads on this forum about this, you'll find that the code referred to will work in early versions of IE 6.0 because it had a bug in it (called an "exploit" by Symantec - the Norton Anti-Virus people) that would let a web page run applications, including formatting the hard drive, without user permission. That has since been patched, so you can't count on it for anything. It's also dangerous because if YOU are using a copy of IE that has that bug, malicious code can do anything to your computer the web programmer wants.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top