-
Javascript Error
Code:
<HTML>
<BODY>
<script language="javascript">
document.PrxOff_onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { bye() }
alert("These images are mine, don't take them");
times++ } }
function bye() {
alert("You should have listened the first time");
bye() }
</script>
[img]blah.jpg[/img]
</BODY>
</HTML>
My intention was to display the first alert as a warning, the second was supposed to start an infinite loop and freeze the computer /or browser. I am not really concerned with the legality of this, and I know people like gg wouldn't mind scripts like this.
Anyways can someone show me what I did wrong or point out the errors or anything?
-
I would reccomend something less destructive like having thier brower redirect from your site or close altogether. Doing something like that might cause retaliations. Anyways, dont some browers have a limit web scripts can run before an alert pops up? At least in asp they do. Anyways, use something else to discourage image stealing.
-
Try this... as always, in common browsers such as (IE) & ect it works real good. Just set it up as a page to direct a bunch of suckers to or put it in with your own scripts. The file name is CoolCrash.html
LMAO need I say more?
-
well you are asking about errors so what errors are you given when you load a page with this script on it? If there is a specific line to look at it would be great
PeacE
-BoB
Okay i tested the script out and for one it doesnt work unless you take out the "PrxOff_" also i dont see anywhere where your variable of times2 is used so that isnt neccesary.
PeacE
-BoB
-
Ah ha! I could have sworn that was the onmousedown thing, that it had to have prxoff_, okay, well it works now, thanks much fl34bit3!
-
no problem. glad you got it fixed.
PeacE
-BoB