Click to See Complete Forum and Search --> : disabling links
srimca
04-10-2003, 06:48 AM
can we disable a link after clicking on it.
and also when other link is clicked the disabled links must be enabled.
is there a way to do this
gil davis
04-10-2003, 07:50 AM
<script>
var prevclicked = null;
function disable(it) {
if (prevclicked == it)
{alert("Disabled!");
return false;}
else
{prevclicked = it;
return true;}
}
</script>
<a href="http://www.yahoo.com" target="test" onclick="return disable(this)">Yahoo!</a><br>
<a href="http://www.google.com" target="test" onclick="return disable(this)">Google</a><br>
<a href="http://www.dogpile.com" target="test" onclick="return disable(this)">Dogpile</a><br>