Site Navigation

Friday, August 3, 2007

Web Design - Side Notes

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:
1a.) Use JavaScript to do the link (via location.href), and set some sort of flag and stop the user on the 2nd - nth time.

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.