Re: Disable the links on the web page...
by Andrew McFarland <aamcf(at)aamcf.co.uk>
|
Date: |
Mon, 22 Apr 2002 21:27:01 +0100 |
To: |
<hwg-basics(at)hwg.org> |
In-Reply-To: |
nrc |
|
todo: View
Thread,
Original
|
|
At 14:53 22/04/02 -0400, Martin Clifford wrote:
>That works, but not with their requirements. They wanted it so that if
>you click a link, all other links become disabled immediately (so that you
>cannot change your mind or something, I have no idea what it would
>accomplish). By your example, it would have to be hardcoded with the link
>disabled, thus defeating the purpose of having the hyperlink there in the
>first place.
Try this:
<.script type="text/javascript">
var c = '';
function clickLimit() {
if (c) {return false};
else {c = 1; return true};
}
</script>
<.a href="foo" onclick="return clickLimit()">Link</a>
Andrew
--
http://aamcf.co.uk/
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA