-
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: 4
Last Post: 10-23-2011, 02: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, 09:36 AM
-
Replies: 0
Last Post: 11-20-2002, 11:16 PM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks