Discussion Locked

VBScript or JavaScript

0 helpful
17 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

2 Part question:

1) I am looking for a way when a user accesses a certain page on our intranet that the address bar, menu bar and tool bar disappears. I know this is possible by openning another window using window.open but I do not want to open another window I want the code to run on the current window.

2) I am also looking for some code that will disable the right click. When a user right clicks I just want it to do nothing. I do not want a menu to come up nor a message bax that says it is disabled.

Thanks
Don

17 replies

by selonboy

I'm not expert in JS or VBS, but i think maybe you can redirect the right click event to Null function.

good luck

by mturnsek

Sorry Don, I don't have an answer but I do have an option to direct to Microsoft, Netscape and others in the software world.
I support an educational environment and would really appreciate a seperate IT version of either Internet Explorer or Netscape Communicator that gives the support staff full control as to how the browser will work in their environment. This way if you don't want the access to "right-click" and the options it provides, you simply setup all these custom settings and then roll it out over the network or include it as the "image" for that particular desktop. Since I'm on a roll, why not customize operating systems this way as well.
Windows 95/98, Windows NT 4, Windows 2000, etc., Linux versions, BeOS....all should be available as secure IT versions completely seperate from the commercial OS that consumers use. This way you customize specifically to your organizational needs.
Yah, and then I wake up. But here's hoping.

by shanghai sam

Sorry Don but here is another websitehttp://www.easyjavascript.com/
Cut and paste script.
Good Luck
Rusty

by amit_acgil

New Page 1

 

 

 

 

 

This is a page from
where you can not do right click as well as the usage of keyboa

by ravi ramakrishnan

I do not know the answer to quetion1, but here is the sample code for question 2.
It is in Javascript. I am assuming that you are going to use it for a form.

function WriteLink()
{
//You can test it with other values of ID.
var ID="M";
if (ID == "M")
SubmitForm("https://www.techrepublic.com");
}

function SubmitForm(strLocation)
{
document.formname.action = strLocation;
document.formname.submit();
}

The code shown below should be in the HTML Body.

by jensr

Actually the javascript definition of a right click is:
For Explorer
event.button==2
or event.button==3 (i guess you want to freeze mouse 3 as well is that is present)
For Netscape
e.which==2 or
e.which==3

About your first question, i don'tknow from the top of my head, but check out earthweb.com they've got good searches on both regular HTML and javascripts.

This discussion is closed to new replies.