Hello, I created this:
http://dl.getdropbox.com/u/340087/Drops/09.20.09/form-e3ae8599-180653.html

The basics are that jQuery will immediately hide a div that is the right most column.
$('div.right').hide();

I have three input elements that when focus is given, I take the next() element, which is the right div, and fade that in.

On blur, I take the next element, and set it back to hidden. This works well, and accomplishes what I want in as minimal code as I am able to hobble together.

Next, I need to validate the fields, so working on "user" and "name" in this case, leaving "email" for later, since it will be more complex.

If the string length of "user" is more than 1, I want to drop a new class to show to the right of the input. It would say "OK" and change the background color to green. If the string is less than 1, it would say "invalid" and change the background to red.

Similar treatment to "name" and "email" of course, just different conditions. Using string length of 1 for simplicity, I will probably do (foo >= 5) or something like that.

I have not been able to get this to work, and I also do not want to add a lot of code for the validation.

Suggestions on the correct process?  How is my current approach?
--
Scott * If you contact me off list replace talklists@ with scott@ *

Reply via email to