Monday, September 06, 2004

Week 3 - validation

I've been working most of the day (May I point out a beautiful labor day ) inside at my computer writing (or attempting to write validation.

We have to validate 3 lousey pieces of information on a form. One dropdown, 2 radio buttons (that's what's on my form anyway). I got the drop down to validate and send a message. Pretty much no problem. I have spent 3 or 4 hours on the radio button. Result? As of right now, my code has nothing but the drop down validation statement and subsequent alert box and its not working either.

I determined that radio buttons are obviously validated differently than text or selection areas. So, I went searching. I found a couple of promising sites but didn't understand the syntax. And, I could see that I had to use a variable for the button and use a loop to check the status of all the choices in the group. I figured there must be an easier way since I hadn't covered anything nearly so complicated in the book or lectures. But, every site I found gave pretty much the same syntax.

Brilliant idea! Read the book. I'm only a little more than half way through chapter 3 so I thought rather than look foolish this must be something I should have read already. The problem is examined early in chapter 4. Then, using the book's syntax as a template I re-wrote the button validation. ERROR! The debugger info just says syntax error and a line number. I don't see anything wrong.

So I figure, well at least I have a piece working. I take out the whole button validation section leaving just the select box and alert message. When I hit the validate button, nothing happens and I get no errors.

I'm going to take care of dinner. Another thing I don't do well, but Jack (the husband) is used to it and its ok if I screw it up.

1 comment:

Anonymous said...

i thought you validated so the info wasn't lousy?
;-)