Favorite snipit of code today

Signing up for unigo.com today I found my favorite piece of javascript. There is a checkbox for:

When checking the box you get this pop up:

Then you think to yourself, WTF? Didn’t my checking the box verify my agreement?

Here is the code that made it all possible:

Hope you enjoyed my code snipit of the day.

2 replies on “Favorite snipit of code today”

  1. @Barry I am not fond of either.

    If someone just clicks on something is it necessary to remind them about what they just clicked on? It puts too much emphasis on the terms, like you are verifying they agreed to them, makes you double think if there is something sneaky in there since you did not read it. It also takes the users mouse away from their flow through your form, they have to move back up to click the OK button then back down to click the Submit, that right there is a huge distraction from the completion process of the form.

    About the code I my only suggestion would be to attach it with an onload event instead of making it inline. It not only makes your code cleaner but also allows you to employ progressive enhancement techniques. Separating the markup from the functionality.

Comments are closed.