Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to disable 'View Source' menu/popup menu in IE

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,145
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to disable 'View Source' menu/popup menu in IE
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to disable 'View Source' menu/popup menu in IE - 6/9/2001 1:32:38 AM   
  compugenie

 

Posts: 9
Score: 0
Joined: 6/9/2001
From: USA
Status: offline
hello all
im developing a testing system for a college based on HTML 4.0 &
VBScript & ASP. problem is this that i want to disable the 'view
source' popup menu item as well as 'view source' menu item in 'View
menu of IE5.0, but i couldn't
do this. can somebody help me??????
 
 
Post #: 1
 
 Re: How to disable 'View Source' menu/popup menu in IE - 6/9/2001 1:33:59 AM   
  jordan

 

Posts: 9
Score: 0
Joined: 6/9/2001
From: USA
Status: offline
if you open the page in a new window like so:

mywin=window.open("mypage.htm","mywin","width=500,height=500")

and place this in script tags inside mypage.htm:

function returnFalse()
{
return false;
}
document.oncontextmenu = returnFalse;

they won't have a way to easily view the source. IF you combine it
with nested frames, you can make it a bit harder, but remember that
someone can always find a way to see the source!

BTW, this is a javascript solution, but you can easily adapt it to
VBScript or use it as is.

(in reply to compugenie)
 
 
Post #: 2
 
 Re: How to disable 'View Source' menu/popup menu in IE - 6/9/2001 1:35:03 AM   
  compugenie

 

Posts: 9
Score: 0
Joined: 6/9/2001
From: USA
Status: offline
thank u,
it really works, but i've done this before. its a simple task to disable the
whole popup-menu. u didn't read my problem carefully, i want that the
popup-menu appears but only the 'View Source' menu-item (i used the
word menu-item) is disable. ok
so if u solve the problem then i really grateful to u....

(in reply to compugenie)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to disable 'View Source' menu/popup menu in IE Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts