Click to See Complete Forum and Search --> : Disable link onclick


bullboss
03-03-2003, 07:33 AM
Hi im trying to make a link disabled after someone have clicked on it?

How do i do it

gil davis
03-03-2003, 09:08 AM
What does the link do?

Normally, a link will take you to another page. If that happens, there won't be a link to disable, or any way to remember that it was clicked. If they come back to the page with the link, the only way you can tell if it was clicked would be to use a cookie.

bullboss
03-04-2003, 02:16 AM
The link makes a submit

document.the_form.submit()

if i click on the link fast it vill make more than one submit and its that i want to stop

gil davis
03-04-2003, 05:50 AM
<script>
var submitted = false;
</script>
...
<a href="..."
onclick="if(!submitted){document.the_form.submit()}else{submitted=true;}return false" ...>