Hello!
I want to let count every click on a link on a website and if the counter
points to 3 another website should be opened in an IFRAME. I know that I
have to insert an onclick event into every link I want to count
and......okay, that was all I know. :)
Can someboby help me here please?
Best regards
Marc
McKirahan - 30 Sep 2007 22:52 GMT
> Hello!
>
[quoted text clipped - 4 lines]
>
> Can someboby help me here please?
Will this help?
<html>
<head>
<title>Marc.htm</title>
<script type="text/javascript">
var count = 1;
function clicks() {
if (count == 3) {
alert("iframe!");
count = 1;
return false;
} else {
count++;
return true;
}
}
</script>
</head>
<body>
<a href="" target="_blank" onclick="return clicks()">Clicks</a>
</body>
</html>