Side Note: #1
If you use document.write(), be sure to use document.close(), especially if you are writing to a popup window... or the throbber will throb as if the page is still loading.
Side Note: #2
Side Note: #3
Does your web application need to ensure that a user only clicks a link once?
Well, there is no easy way to do this, but here's a few tips:
1b.) If you are using a link, use the onclick attribute instead of the href attribute. If the user presses Escape, or another link before the first link gets to the server and back, then the first request will get canceled. Using any of the "event" attributes will trigger a request that can't be canceled by the end user.
2.) Keeping 1b in mind, use an <input type="button"/> element. With a button, you can also disable the button after the first click, so the user knows it can't be clicked again.