If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Radio button validation problem

I should start by saying that I'm developing this form in the Lotus Domino environment which may or may not be causing some of this "strange" behavior.
A form that I've been working has a section that requires some field validation based on whether a radio button is checked. This section comes in towards the end of the form. Now, I've been able get the validation to work however the form will not submit. After further analysis I found that what it seems not to like is the 'name' tag for the radio button. If I remove the tag the form will submit. However, doing that bypasses my validation. If I leave the name tag in and change from a radio to a button the form will submit. The code I have is as follows:

Presumably it's in a function; you're using an absolute reference for the radio button, a solo name property for the Date2 field - and - I'm assuming - a passed form object (Form) for the last. What you've described is not typical; there's an error somewhere.

Thanks for the code; it is much cleaner than mine. Unfortunately I still run into the exact problem. The form will not submit once it reaches that radio button validation and the IE browser reports no errors; I just recieve a "page cannot be found". I made the following changes to see what effect it would have.

Left the input type as "radio" and changed the "name" tag to another name (to bypass validation) - Result - form would not submit

Left input type as "radio" and removed the "name" tag entirely - Result - validation bypassed; form would submit

Changed input type to button and left name tag - Result - validation bypassed; form would submit.

I don't know how valid this little test was but it seems have a problem with radio button validation. I did post this on a Domino forum to see if it's the environment but the responses I get back don't seem to support that. Being a novice, I'm not quite sure how to change the code to validate based on a button click but I'd be curious to see if it indeed behaves differently.

Be glad to help more on this. If you can, zip that page up & attach it below; seeing the entire structure always helps. Again - there's nothing obvious in your description (to me) that, in itself, suggests what might be going amiss.

btw: "page cannot be found" usually pops up when a form has been submitted and the action URL can't be located.

I want to thank you for your help. I cleaned up my code based on your sample and it is much cleaner. Unfortunately I'm still running into the same problem. For some reason it seems that the "name" tag is at the root of the problem. With it in there the validation works flawlessly but the form will not submit. With it removed, the form submits fine. I have to suspect that it may have something to do with the Domino environment. I'll do some more investigating on the Domino sites. Again, I appreciate the time you have taken to work with me on this.