473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Prevent Right Clicks & View Source for Firefox & IE

i am using dreamweaver 8 to build my site. i want to put a code in that stops people from viewing my page source and right clicking on the page. i did a google to find a code for this and used it. it works in IE 7 but not in Firefox. PLEASE....i would greatly appreciate the help. below is the code i found.


</script>
<SCRIPT LANGUAGE="JavaScript1.1">

<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Thank You For Visiting.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
// End -->
</script>
Dec 28 '07 #1
1 1642
BigDaddyLH
1,216 Expert 1GB
You've made a common mistake: JavaScript is unrelated to Java, despite the name. Just as there is no dog in a hotdog, there is no Java in JavaScript. Try the JavaScript forum.
Dec 28 '07 #2

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

Similar topics

11
by: yaktipper | last post by:
This explains how to disable the view source / right-click menu in Netscape 4, Netscape 6 and Internet Explorer (IE). <script language="JavaScript"> //This code is the beginning of the right...
102
by: me | last post by:
How do I prevent the save/print/email/mypictures toolbar from popping up when IE users place their cursor over photos at my website? Thank you in advance for your help. Signed, me
11
by: simonmarkjones | last post by:
Hello there! I'm Still pretty new to access only been using it for a couple of days. If a record has been partially filled out or even completly filled out and then the form is closed or the...
11
by: moondaddy | last post by:
I have images that I need to prevent the user from doing a right click and selecting "Save Picture As"? How can I do this? -- moondaddy@nospam.com
3
by: Brooke | last post by:
How can I prevent a user from viewing the html code on a web page? e.g. right click->view source
1
by: j7.henry | last post by:
I am trying to pull specific data that is in a comma delimited file into a web page. So if my comma delimited file looks like: Name,Address,Zip Fred,123 Elm,66666 Mike,23 Jump,11111 I would...
6
by: Ray Booysen | last post by:
Hi all Has anyone had any success in using Visual Studio and Firefox -> View Source. If I click view source on firefox in a site I'm developing that requires a login, the source I see is the...
14
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.