-
Conditional button required
I am trying to make a radio button required (Oliftgate) if another radio button (OType) is equal to a certain value (NoDock). I've got other required fields that are working, but this one is not. Probably because I am combining things and am likely doing it wrong.
Any ideas?
code:
if (form.OType.value == "NoDock" && form.Oliftgate.value == "") { //This checks to see if the liftgate option is filled in when Business Without Doc is equal to No Dock
alert("You must answer the liftgate question when selecting this option.");
form.Oliftgate.focus(); //This focuses the cursor on the empty field
return false; //This prevents the form from being submitted
}
Thanks in advance!
Similar Threads
-
By James Graham in forum .NET
Replies: 7
Last Post: 07-16-2013, 11:47 PM
-
By 2eXtreme in forum Java
Replies: 0
Last Post: 04-05-2006, 07:38 AM
-
By DrunkinP in forum Java
Replies: 0
Last Post: 03-31-2005, 10:36 AM
-
Replies: 0
Last Post: 11-21-2002, 12:16 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|