Click to See Complete Forum and Search --> : checkboxes and setting form field values


idiotbear
06-24-2003, 05:29 AM
hey

I have a checkbox called varFee, which tells my form whether or not a fee is variable.

If the box is checked, I need the "amount" textfield to be set to 0 and the focus to go to the "StartDate" textfield.

If the box is unchecked, I need the contents of the "amount" textfield to be selected.

I know how to do these two things ON THEIR OWN by calling a function in varFee's onclick property, but how can I combine them so they do one thing if the box is checked, and the other if it's unchecked? I guess it's an if statement, but I can't for the life of me get it right.

Cheers

Rob