P[re]Script: Pardon the messed up formatting... this is the first code-related blog I have done in quite some time, and this editer nas, well, sucked for doing code. Next time, I'll be back with a new plan for typing code. Till then, enjoy!
Many times a programmer has a need to integrate some client side error-checking into a mainly server-side oriented page. You can use Javascript to do basic validation, interface touch-ups, as well as call back to web services to handle many tasks in a way that is user-friendly.
Let's say that we would like to do some error checking on a text box, after the user moves the focus from this box. In the scripting world, this is called "blurring" as an opposite of focussing.
So, we need to set the onBlur property of the text box to be a function that we will write in Javascript:
Read More »