As good as a holiday

I'm back at work now after a nice holiday down south to Newcastle and Sydney. I also got the chance to finish JavaScript: The Good Parts. It was a great informative read, and I definitely recommend it to JavaScript developers.
I've made some changes tonight to how this site works. They are mainly for your convenience.
Client-side Form Validation
The comment form and the contact me form now utilise client-side validation. I leverage the jQuery Validation plugin hosted on Microsoft's CDN to make this process easier.
I noticed that by default, the jQuery plugin will deem URLs such as example.com to be invalid. I'd prefer if it could automatically tack on the http://, so I wrote a regex that checks to see if http, https or ftp (covering all bases) is the prefix, and if not, prepend http:// before validating.
Auto Growing Textarea
Just like Facebook, when you enter more text than my textareas allow, instead of triggering scroll bars, they will now auto grow to fit. The lovely Elastic jQuery plugin made implementing this much easier. I had attempted once to write my own plugin like this, but I ran into a few problems, and discovered so many good ones on the net that I simply gave up!
Remembering User Details
I noticed once cool feature of some Wordpress sites is the ability to save my name, email and URL for future comment posting. Because I developed my own front end to Wordpress, I decided to implement this feature myself.
To save expensive DB updates, I decided to simply save the data in a client side cookie. I make sure I encode HTML entities before echo'ing them to the page for security reasons.
Enjoy!
I hope these few changes make your experience with my site that little bit easier!
Comments
Alexander Dickson
Posted on Sunday, 10th January 2010 @ 6:57pm.@Andy K Happy new year to you too!
Thanks for dropping by, and I hope you weren't stung too badly by the JavaScript bug on the URL input element!
Courtnee
Posted on Friday, 8th January 2010 @ 10:35am.nice photo! we should have stayed longer!
Andy K
Posted on Thursday, 7th January 2010 @ 12:32am.This is exactly why I visit your site every now and then. You've always ended up doing these nice stuff I could perhaps never think of doing. :D
Oh, and, happy new year Alex!
Leave a Comment
Note: Your comment may require approval before it is posted to the site.