If you do any sort of Web Application development where you interact with form data, you owe it to yourself to check out the qForms Javascript API. It does all sorts of great things with validation and manipulating form fields dynamically, and it makes it easier than handcoding the scripts or cobbling together functions from other places. I haven’t had the time to check and see how it stands up to cross platform and cross browser testing yet because we are developing for a fixed platform/browser combination.