Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 12th, 2007, 10:13 AM
Registered User
 
Join Date: Apr 2007
Location: , , Canada.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need to disable nearly everything

We need to disable all browser functions when opening a window. This is for a corporate app and security wise want the printing, save, cut, copy, alt, ctl,Fkeys essentually everything shut off but scrool and close. We are converting everything to a graphic file so no highlighting will work either.

What about shift print screen?

Consider this an IE project.

B
Reply With Quote
  #2 (permalink)  
Old April 12th, 2007, 10:17 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Please don't cross post, once is enough:
http://p2p.wrox.com/topic.asp?TOPIC_ID=17726


Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design, 2nd Edition
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote
  #3 (permalink)  
Old April 12th, 2007, 12:25 PM
Registered User
 
Join Date: Apr 2007
Location: , , Canada.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx making it difficult for most users is what we need to achieve. Can you disable shift print screen at the OS level,

My guys did some playing but found IE 6-7 is different on 98, XP and now vista, what a pain. We have some fancy ways of removing from cache. And if you try turning off java script wwindow will not open. Currently im told we do it in a pop-up

But any more novel ideas you have would be appreaciated

Bryon:(






You can disable to your heart's content, but keep in mind the user can go around all of that and get the content directly from the cache. This is even easier to do in IE. You can disable the cache too, but in that case the user can disable script and just access the content directly.

You can make it difficult, but it's not impossible to work around disabling those controls. Any content rights management in a browser that you hope to attain is an illusion and should be treated as such.

You also don't need to convert to a graphic to prevent selection.



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




Regards,
Rich
Reply With Quote
  #4 (permalink)  
Old April 12th, 2007, 02:13 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Here is the thing: even if you got an application wrote that met all of your above specs, I will still be able to rip your content AND meet all your requirements (javascript on, etc).

While you *might* be able to write an activeX control that will disable shift print (or simply the print screen button) that code is ONLY available in the context of your page. So, since that code is only available in the context of your page all i have to do is click a browser window on my other montior, make it the active window, hit print screen and viola! I have your output captured.

Of course, you could watch for window.onBlur() and then call window.close() but, seriously, if your application was that restrictive, I wouldn't use it. Protecting your content is one thing, giving your users a horrible experience from any standpoint (in this case usability) is another thing.

I could think of a few other ways to grab this content without much thought, but ill leave those go. The long and the short of it is this: if you have something that you dont want other people to use, take, steal, borrow, or whatever else, don't put it on the web.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #5 (permalink)  
Old April 13th, 2007, 12:20 PM
Registered User
 
Join Date: Apr 2007
Location: , , Canada.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No please eloborate, i realize thare are commercial screen grab tools of which we would like to find away to plug, but short of a exe running on the desktop dont think we can do everywhere but trying to block as many browser page content leaks as we know about.

Also how would we tun off shift prn/screen and dragndrop graphics.

Kindly

Bryon
Reply With Quote
  #6 (permalink)  
Old May 7th, 2007, 12:07 PM
Registered User
 
Join Date: May 2007
Location: Norcross, GA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<SCRIPT LANGUAGE="Javascript"><!--
// ***********************************************
// AUTHOR: WWW.kamuditechnologies.com, LLC
// URL: http://www.kamuditechnologies.com
// Use the script, just leave this message intact.
// Place in <head> tags
// ***********************************************
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUS EUP);
function mischandler(){
  if(EnableRightClick==1){ return true; }
  else {return false; }
}
function mousehandler(e){
  if(EnableRightClick==1){ return true; }
  var myevent = (isNS) ? e : event;
  var eventbutton = (isNS) ? myevent.which : myevent.button;
  if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
  var myevent = (isNS) ? e : window.event;
  if (myevent.keyCode==96)
    EnableRightClick = 1;
  return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
window.open('http://yourdomain.com', 'Widgetville', 'location=No,menubar=No,resizable=No,scrollbars=No ,status=No,toolabr=No,width=900,height=700');
//-->
</script>

Also disable copy/paste drag/drop put this in the body...

<body bgcolor="#FFFFFF" ondragstart="return false" onselectstart="return false">
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable View>Source (disable html source) kazmughal44 HTML Code Clinic 11 December 11th, 2007 11:53 AM
how to disable textbox tllcll BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 0 October 31st, 2005 03:48 AM
How to Disable a Mousewheel Brendan Bartley Access 2 August 28th, 2005 07:36 PM
is it possible to disable titlebar? g_srinivas Javascript 0 July 23rd, 2004 08:50 AM
Disable Keyboard shiju VS.NET 2002/2003 0 August 22nd, 2003 10:29 AM



All times are GMT -4. The time now is 08:11 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.