Hi guys!
I am working on a java code to stop users from using a frame breaker when surfing for credits. I am almost there but it still isn't bullet proof.
Here is the code I am using so far:
<script language="Javascript">
<!--
var your_message = "Do you really want to leave this page? Click yes if you want to or click cancel if a frame breaker caused this pop up.";
var times = 0;
function onul() {
if (times == 0) {
var leave = confirm(your_message);
if (!leave) location = self.location;
times++;
}
}
//-->
</script>
<body onunload="onul()">
When the user clicks cancel it is suppose to take the user back surfing but it ends up going to the frame breakers site.
Here is a sample frame breaker code many use:
<script language="Javascript">
<!--
if (top.location != self.location) {
top.location = self.location.href
}
//-->
</script>
If you can assist thank you so much also any other suggestions are welcomed!
I am working on a java code to stop users from using a frame breaker when surfing for credits. I am almost there but it still isn't bullet proof.
Here is the code I am using so far:
<script language="Javascript">
<!--
var your_message = "Do you really want to leave this page? Click yes if you want to or click cancel if a frame breaker caused this pop up.";
var times = 0;
function onul() {
if (times == 0) {
var leave = confirm(your_message);
if (!leave) location = self.location;
times++;
}
}
//-->
</script>
<body onunload="onul()">
When the user clicks cancel it is suppose to take the user back surfing but it ends up going to the frame breakers site.
Here is a sample frame breaker code many use:
<script language="Javascript">
<!--
if (top.location != self.location) {
top.location = self.location.href
}
//-->
</script>
If you can assist thank you so much also any other suggestions are welcomed!








