Here is my first jQuery code: <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> // ---- After document is loaded, run this ----- $(document).ready( function() { MyJScript(); } ) // ---- MyJScript ------------------------- function MyJScript() { // get all TextBoxes with class MyInput var TextBoxes = $(".MyInput"); // if any TextBoxes are blank, set the // background color to yellow TextBoxes.each( function Yellowize() { if (this.value == "") this.style.backgroundColor = "yellow"; } ) } </script>which I think somehow related to your problem, though it shows how to find controls of certain type in client-side code.