Click to See Complete Forum and Search --> : Looking for a script


aoeguy
07-25-2003, 03:57 PM
Hi

I have looked through this site for a while and not found a script:

--

A script that stops you from clicking a button/banner before you click (next) button.

--

Maybe there is some HTML code for it but i would not think so. Could someone please post a script that does that in here?

Thanks

pyro
07-25-2003, 05:52 PM
Something like this should work, for those with javascript enabled. If it is not enabled, they will still be able to get the second link, without clicking the first, to keep it compliant.

<head>
<script language="javascript">
x = 0;
function canClick() {
if (x == 1) {
window.location.href = "http://www.w3c.org";
}
}
</script>
</head>
<body>
<a href="#" onclick="x = 1;">Click here first</a>
<a href="http://www.w3c.org" onclick="canClick(); return false;">Must click link 1 first</a>

aoeguy
07-26-2003, 01:12 AM
Thanks

Ill just add that to my site.

Olé! It works well, but would it work instead of
- window.loacation.href= "page" -
open a new window
- window.open ('page', 'My HP', 'personalbar=yes,toolbar=no,dependent=no,resizable=no,status=no,menubar=no,locationbar=no,width=550, height=500')"

didnt work when i tried it...