By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

partially disable javascript

P: 1
Hi i need a solution of partially disable certain javascript commands, most noteably pop up dialog windows (message box, calling print() for print dialog). I've found proxomitron but did not give a try yet. Is there any other alternatives? Thanks!
Oct 18 '06 #1
Share this Question
Share on Google+
1 Reply

P: 29
the best way i would know of to disable javascript commands is to simply overwrite them with your own code. for example, to overwrite the print() command you would add this to your code.

Expand|Select|Wrap|Line Numbers
  1. self.window.print = function(){
  2. return false;
  3. }
or play with it a little like.

Expand|Select|Wrap|Line Numbers
  1. self.window.print = function(){
  2. alert("access viloation at memory address: 0xFFFFFF\n Printer is not installed.")
  3. }
any way you get the idea ;)
Oct 18 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.