BinBrain Community
Welcome, Guest. Please login or register.
February 08, 2012, 08:05:05 AM

Login with username, password and session length
Search:     Advanced search
760 Posts in 417 Topics by 2746 Members
Latest Member: Ditalully
* Home Help Search Login Register


Online Exams | Blogs | Photos | Videos | Real Estate | Recipes | Business Directory| TV | Free Wallpapers
+  BinBrain Community
|-+  Computer Forums
| |-+  PHP/MySQL
| | |-+  validate a group of radio button in a form with php
« previous next »
Pages: [1] Print
Author Topic: validate a group of radio button in a form with php  (Read 927 times)
dentaura
Newbie
*
Posts: 2



WWW
« on: June 30, 2009, 10:13:12 PM »

PLEASE CORRECT THIS JAVA SCRIPT TO VALIDATE THE FORM FIELD

<script>
function ValidateContactForm()
{
    var CategoryOpt = document.ContactForm.CategoryOpt;
    if (CategoryOpt.value == "")
    {
        window.alert("Please enter your Membership Category.");
        CategoryOpt.focus();
        return false;
    } 
    return true;
}
</script>


BELOW IS THE FORM FIELD

<td width="176">
<font face="Verdana">
<input type="radio" value="Radiobutton1" name="CategoryOpt" tabindex="5"><font size="2">
<font color="#000080">Radiobutton1</font><br>
</font>
<input type="radio" value="Radiobutton2" name="CategoryOpt" tabindex="7">
<font size="2" color="#000080">Radiobutton2</font></font></td>
<td width="161">
<font face="Verdana">
<input type="radio" value="Radiobutton3" name="CategoryOpt" tabindex="6">
<font size="2"><font color="#000080">Radiobutton3</font><br>
</font>
<input type="radio" value="Radiobutton4" name="CategoryOpt" tabindex="8">
<font size="2" color="#000080">Radiobutton4</font></font></td>
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Social Campaigns

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!