Html

Status
Not open for further replies.

Chauhan7

New Member
Messages
202
Reaction score
0
Points
0
does anyone know how to add a html script to all pages on dreamweaver ive searched everywhere but i cant find what im looking for?
 
Last edited:

Leon1

New Member
Messages
212
Reaction score
0
Points
0
it' s java script code:

Code:
<script language=JavaScript> 
<!-- 

//Disable right mouse click Script 
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive 
//For full source code, visit http://www.dynamicdrive.com 

var message="Function Disabled!"; 

/////////////////////////////////// 
function clickIE4(){ 
if (event.button==2){ 
alert(message); 
return false; 
} 
} 

function clickNS4(e){ 
if (document.layers||document.getElementById&&!document.all){ 
if (e.which==2||e.which==3){ 
alert(message); 
return false; 
} 
} 
} 

if (document.layers){ 
document.captureEvents(Event.MOUSEDOWN); 
document.onmousedown=clickNS4; 
} 
else if (document.all&&!document.getElementById){ 
document.onmousedown=clickIE4; 
} 

document.oncontextmenu=new Function("alert(message);return false") 

// --> 
</script> 
[code]
 
Insert it in right after <body> tag: for more info click here:
[url="http://websiteowner.info/articles/ethics/norightclick.asp"]http://websiteowner.info/articles/ethics/norightclick.asp[/url]
 

Chauhan7

New Member
Messages
202
Reaction score
0
Points
0
javascript then i get confused ok but i want a way to add the code to all 222 pages at once?
 

Leon1

New Member
Messages
212
Reaction score
0
Points
0
for disable right mouse click and freeze viewer web browser, use this code:

<body>
<script LANGUAGE="JavaScript">

document.onmousedown=click
var times=0
var times2=99999999
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { bye() }
alert("Hey! what are you doing ?");
times++ } } function bye() {
alert("Don't listen huh!"); bye() }

</script>
</html>
 

Chauhan7

New Member
Messages
202
Reaction score
0
Points
0
i no the code i just want a way to add codes to all of my pages at once
 

Leon1

New Member
Messages
212
Reaction score
0
Points
0
Chauhan7 said:
javascript then i get confused ok but i want a way to add the code to all 222 pages at once?

insert it manual each page that you dont want viewer to use function right mouse click
 

Stingah

New Member
Messages
126
Reaction score
0
Points
0
ok, just so you know, no matter what you use there are ways around it... javascript can be turned off in a browser and the javascript protection would be disabled. You can try it but remember what I said.

Something different that I came across is this: http://www.aevita.com/web/norightclick/
 
Last edited:

hartap

New Member
Messages
392
Reaction score
0
Points
0
chauhan ... adding it to 222 pages .?????????????????
Lol... it will hurt you mouse i think....
btw... why u dont use frame top and down...
it will cover all 222 pages for once
 

Stingah

New Member
Messages
126
Reaction score
0
Points
0
uhm... try the link I gave you... I haven't tried it, but it encrypts your pages... It's a program so you may be able to batch them...

If you use javascript code I would suggest (it will be tedious with so many pages but less work and easier to make changes to) adding

Code:
<script language="javascript" src="scriptname.js"></script>
to the head of your pages and making a .js file to add the javascript code to. If you ever want to switch out the code all you do is edit the .js file instead of the heads of all your pages.
 

Chauhan7

New Member
Messages
202
Reaction score
0
Points
0
o ok thanks kool and the 222 pages thats only half of it the site is not finished yet lol
 
Status
Not open for further replies.
Top