59 users online (1 members and 58 guests)  


  Results 1 to 9 of 9

Related

  1. Replies: 3
  2. Validating Integer in Javascript    Forum: PHP Forum
    Replies: 2
  3. validating a form    Forum: Javascript Forum
    Replies: 1
  4. CSS not validating    Forum: CSS Forum
    Replies: 2
  1. #1
    palavi's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    14

    Unhappy validating the checkbox,list/menu..

    Hi all,
    I just want to make sure that the user must enter date which is a drop down menu DD/MM/YYYY,
    Radiobutton male/female. and a make sure that user must click the checkbox before submiiting the form to server. i am using dreamweaver in which i ve validated text fields..please help me

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: validating the checkbox,list/menu..

    Could you please show us what you've got so far. We'll start whiping one basing on what you have.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  3. #3
    palavi's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    14

    Re: validating the checkbox,list/menu..

    hi rangana,
    here is my code i ve validated emailid field using dreamweaver's code but not working the main problem is after submitting as soon as da window apprears it goees to next page ..
    here is my code
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <script type="text/JavaScript">
    <!--
    function checkForm(thisform)
      {
        if(thisform.fname.value=='')
        {
          alert("Fname field is required. Please fill it in.");
          return false;
        }
    	if(thisform.lname.value=='')
        {
          alert("Lname field is required. Please fill it in.");
          return false;
        }
       
        if(thisform.emailid.value=='')
        {
          alert("Email field is required. Please fill it in.");
          return false;
        }
    	 if(thisform.address.value=='')
        {
          alert("Address field is required. Please fill it in.");
          return false;
        }
    	if(thisform.city.value=='')
        {
          alert("City field is required. Please fill it in.");
          return false;
        }
    	if(thisform.state.value=='')
        {
          alert("State field is required. Please fill it in.");
          return false;
        }
    	if(thisform.country.value=='')
        {
          alert("Country field is required. Please fill it in.");
          return false;
        }
    	
        if(thisform.contactno.value=='')
        {
          alert("Phone Number field is required. Please fill it in.");
          return false;
        }
    	if(thisform.checkbox.value=='')
        {
          alert("Please click on the checkbox ");
          return false;
        }
        //if all is OK submit the form
    
        thisform.submit();
      }
    
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    }
    
    
    //-->
    </script>
    </head>
    
    <body>
    
    <table width="779" border="2" cellpadding="2" cellspacing="2" onSubmit="MM_validateForm('fname','','R','lname','','R','emailid','','NisEmail','address','','R','city','','R','state','','R','country','','R','contactno','','RisNum');return document.MM_returnValue">
      <tr>
        <td width="579" height="158">&nbsp;</td>
      </tr>
      <tr bgcolor="">
        <td height="64">&nbsp;</td>
      </tr>
      <tr>
        <td height="68">
    	<form action="mem2.html" method="get" name="form2">
         Fname: <input type="text" name="fname" />
    	 </form>
        </td>
      </tr>
      <tr>
        <td height="64">
    	<form action="mem1.html" method="get" name="form3">
    	Lname: <input type="text" name="lname" />
    	</form>
    	</td></tr>
    	
      <tr>
        <td height="56">  
    	<form action="mem2.html" method="get" name="form4">
    	Date of birth:
          <select name="DD">
          <option value="DD">DD</option>
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          <option value="5">5</option>
          <option value="6">6</option>
          <option value="7">7</option>
          <option value="8">8</option>
          <option value="9">9</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
          <option value="13">13</option>
          <option value="14">14</option>
          <option value="15">15</option>
          <option value="16">16</option>
          <option value="17">17</option>
          <option value="18">18</option>
          <option value="19">19</option>
          <option value="20">20</option>
          <option value="21">21</option>
          <option value="22">22</option>
          <option value="23">23</option>
          <option value="24">24</option>
          <option value="25">25</option>
          <option value="26">26</option>
          <option value="27">27</option>
          <option value="28">28</option>
          <option value="29">29</option>
          <option value="30">30</option>
          <option value="31">31</option>
    	</select>
    	<select name="MM">
    	  <option value="MM">MM</option>
    	  <option value="jan">jan</option>
    	  <option value="feb">feb</option>
    	  <option value="mar">mar</option>
    	  <option value="apr">apr</option>
    	  <option value="may">may</option>
    	  <option value="june">june</option>
    	  <option value="july">july</option>
    	  <option value="aug">aug</option>
    	  <option value="sep">sep</option>
    	  <option value="oct">oct</option>
    	  <option value="nov">nov</option>
    	  <option value="dec">dec</option>
    	</select>
    	<select name="YYYY">
    	  <option value="YYYY">YYYY</option>
    	  <option value="1980">1980</option>
    	  <option value="1981">1981</option>
    	  <option value="1982">1982</option>
    	  <option value="1983">1983</option>
    	  <option value="1984">1984</option>
    	  <option value="1985">1985</option>
    	  <option value="2000">2000</option>
    	  <option value="2006">2006</option>
    	  <option value="2007">2007</option>
    	  <option value="2008">2008</option>
    </select></form> </td>
      </tr>
      <tr>
        <td height="11"> 
    	<form action="mem2.html" method="get" name="form5">
    	Gender:
          <input name="gender" type="radio" value="Male"/>
          Male
    	<input name="gender" type="radio" value="Female"/>
    	Female
    </form>
        </td>
      </tr>
      <tr>
        <td height="65"> 
    <form action="mem2.html" method="get" name="form6">
         Emailid: 
           <input type="text" name="emailid"/>
    </form>
        </td></tr>
        
      
      <tr>
        <td height="55" >
    	<form action="mem2.html" method="get" name="form7">
         Address: <input type="text" name="address" />
    	</form>
        </td>
      </tr>
      <tr>
        <td height="54" >
          <form action="mem2.html" method="get" name="form8">
         City: 
           <input type="text" name="city"/>
    	</form>
        </td>
      </tr>
      <tr>
        <td height="55"  >
        <form action="mem2.html" method="get" name="form9">
          State:<input type="text" name="state"/>
    	 </form> 
        </td>
      </tr>
      <tr>
        <td height="72" >
    	
         <form action="mem2.html" method="get" name="form10">
       Country:<input type="text" name="country" /> 
       </form>  </td>
      </tr>
      <tr>
        <td height="49">
          <form action="mem2.html" method="get" name="form11">
          Contact no.
            <input type="text" name="contactno"/>
    	  </form>
        </td>
      </tr>
      <tr>
        <td height="53" >
    	
     <input name="checkbox" type="checkbox"  value="checked" />
     I agree terms and conditions.
      
    
    
        </td>
      </tr>
      <tr>
        <td height="47">
    	<form name="form1" action="db.jsp">
    	       <input type="submit" name="submit" value="Register Me"  onclick="return checkForm(this.form)" />
     
    	</form></td>
      </tr>
    </table>
    
    </body>
    </html>
    Last edited by rangana; 08-01-2008 at 12:20 AM. Reason: Wrap in [html][/html] tag.

  4. #4
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: validating the checkbox,list/menu..

    Why are the a good number of forms? All of the data from your will only be sent to the last form whose action is db.jsp. The element within the above-mentioned form is only the submit button so there's no data being sent.

    Hope it makes sense.

    While you were fixing the markup errors, you need not to reinvent the wheel. There are a lot of site that is explaining form validation:
    http://www.w3schools.com/js/js_form_validation.asp
    http://www.elated.com/articles/form-...th-javascript/
    http://developer.apple.com/internet/...alidation.html
    http://www.yourhtmlsource.com/javasc...alidation.html
    or a simple google search would do it.

    Get back if you're still stumped.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  5. #5
    palavi's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    14

    Re: validating the checkbox,list/menu..

    hi,
    thanks for those links, in second link i got da code but at da first it worked halfly then i tried to convert vadidate function() into thisform() which didnt work now i changed it and made it proper now there r two functions validate_form() for radiobutton,drop down,n checkbox n other thisform() for text fields,but now this form is working but not validate_form ();..i also ve dreamweaver code for valid emailid checking for @ and dot symbol and contactno field for only numbers. can u check wats wrong i ll paste my code here plz.. at first wen i pasted code as it is it worked but after alerting message it went to next page without taking the missing data...
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <script type="text/JavaScript">
    <!--
    function checkForm(thisform)
      {
       
    	if(thisform.lname.value=='')
        {
          alert("Lname field is required. Please fill it in.");
          return false;
        }
       
        if(thisform.emailid.value=='')
        {
          alert("Email field is required. Please fill it in.");
          return false;
        }
    	 if(thisform.address.value=='')
        {
          alert("Address field is required. Please fill it in.");
          return false;
        }
    	if(thisform.city.value=='')
        {
          alert("City field is required. Please fill it in.");
          return false;
        }
    	if(thisform.state.value=='')
        {
          alert("State field is required. Please fill it in.");
          return false;
        }
    	if(thisform.country.value=='')
        {
          alert("Country field is required. Please fill it in.");
          return false;
        }
    	
        if(thisform.contactno.value=='')
        {
          alert("Phone Number field is required. Please fill it in.");
          return false;
        }
    	
        //if all is OK submit the form
    
        thisform.submit();
      }
      
     
    
    function validate_form ( )
    {
        valid = true; 
        
    	if ( ( document.form1.gender[0].checked == false )      //validation for Radiobutton
        && ( document.form1.gender[1].checked == false ) )
        {
            alert ( "Please choose your Gender: Male or Female" );
            valid=false;
        }
    	
    	
       
     if ( document.form1.DD.selectedIndex == 0 )
        {
            alert ( "Please select DD." ); //validation for drop down  list
           valid=false;
        }
    	if (document.form1.MM.selectedIndex == 0 )
        {
            alert ( "Please select MM." ); //validation for drop down  list
            valid= false;
        }
    	if ( document.form1.YYYY.selectedIndex == 0 )
        {
            alert ( "Please select DD." ); //validation for drop down  list
           valid= false;
        }
    if ( document.form1.checkbox.checked == false )
        {
            alert ( "Please check the Terms & Conditions box." );  //validation for checkbox
          valid= false;
        }
    
     
      }
      
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    }
    
    
    //-->
    </script>
    </head>
    
    <body>
    <form action="db.jsp" method="post" name="form1" onSubmit=="return validate_form ( );">
    <table width="779" border="2" cellpadding="2" cellspacing="2" onSubmit="MM_validateForm('fname','','R','lname','','R','emailid','','NisEmail','address','','R','city','','R','state','','R','country','','R','contactno','','RisNum');return document.MM_returnValue">
      <tr>
        <td width="579" height="158">&nbsp;</td>
      </tr>
      <tr bgcolor="">
        <td height="64">&nbsp;</td>
      </tr>
      <tr>
        <td height="68">
    	
         Fname: <input type="text" name="fname" />
    
        </td>
      </tr>
      <tr>
        <td height="64">
    	
    	Lname: <input type="text" name="lname" />
    	
    	</td></tr>
    	
      <tr>
        <td height="56">  
    	
    	Date of birth:
          <select name="DD">
          <option value="DD">DD</option>
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          <option value="5">5</option>
          <option value="6">6</option>
          <option value="7">7</option>
          <option value="8">8</option>
          <option value="9">9</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
          <option value="13">13</option>
          <option value="14">14</option>
          <option value="15">15</option>
          <option value="16">16</option>
          <option value="17">17</option>
          <option value="18">18</option>
          <option value="19">19</option>
          <option value="20">20</option>
          <option value="21">21</option>
          <option value="22">22</option>
          <option value="23">23</option>
          <option value="24">24</option>
          <option value="25">25</option>
          <option value="26">26</option>
          <option value="27">27</option>
          <option value="28">28</option>
          <option value="29">29</option>
          <option value="30">30</option>
          <option value="31">31</option>
    	</select>
    	<select name="MM">
    	  <option value="MM">MM</option>
    	  <option value="jan">jan</option>
    	  <option value="feb">feb</option>
    	  <option value="mar">mar</option>
    	  <option value="apr">apr</option>
    	  <option value="may">may</option>
    	  <option value="june">june</option>
    	  <option value="july">july</option>
    	  <option value="aug">aug</option>
    	  <option value="sep">sep</option>
    	  <option value="oct">oct</option>
    	  <option value="nov">nov</option>
    	  <option value="dec">dec</option>
    	</select>
    	<select name="YYYY">
    	  <option value="YYYY">YYYY</option>
    	  <option value="1980">1980</option>
    	  <option value="1981">1981</option>
    	  <option value="1982">1982</option>
    	  <option value="1983">1983</option>
    	  <option value="1984">1984</option>
    	  <option value="1985">1985</option>
    	  <option value="2000">2000</option>
    	  <option value="2006">2006</option>
    	  <option value="2007">2007</option>
    	  <option value="2008">2008</option>
    </select> </td>
      </tr>
      <tr>
        <td height="11"> 
    	
    	Gender:
          <input name="gender" type="radio" value="Male"/>
          Male
    	<input name="gender" type="radio" value="Female"/>
    	Female
    
        </td>
      </tr>
      <tr>
        <td height="65"> 
    
         Emailid: 
           <input type="text" name="emailid"/>
    
        </td></tr>
        
      
      <tr>
        <td height="55" >
    	
         Address: <input type="text" name="address" />
    	
        </td>
      </tr>
      <tr>
        <td height="54" >
          
         City: 
           <input type="text" name="city"/>
    	
        </td>
      </tr>
      <tr>
        <td height="55"  >
       
          State:<input type="text" name="state"/>
    	
        </td>
      </tr>
      <tr>
        <td height="72" >
    	
         
       Country:<input type="text" name="country" /> 
         </td>
      </tr>
      <tr>
        <td height="49">
          
          Contact no.
            <input type="text" name="contactno"/>
    	  
        </td>
      </tr>
      <tr>
        <td height="53" >
    	
     <input name="checkbox" type="checkbox"  value="checked" />
     I agree terms and conditions.
      
    
    
        </td>
      </tr>
      <tr>
        <td height="47">
    	
    	       <input type="submit" name="submit" value="Register Me"  onclick="return checkForm(this.form)" />
     
    	</td>
      </tr>
    </table>
    </form>
    </body>
    </html>
    Last edited by rangana; 08-01-2008 at 03:22 AM. Reason: Add [html][/html] tag

  6. #6
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: validating the checkbox,list/menu..

    Find these notes useful:
    1. Make use of the forum's [code][/code] tag.
    2. Added fname in the validation.
    3. Added script to focus on the elements that don't have values
    4. Need to remove highlighted at this part:
      Code:
      <form action="db.jsp" method="post" name="form1" onSubmit=="return validate_form();">
    5. Though it has nothing to do with your code, height and width are deprecated attributes. Should go with CSS.
    6. onsubmit is not table's attribute, so highlighted is erroneous:
      Code:
      <table width="779" border="2" cellpadding="2" cellspacing="2" onSubmit="MM_validateForm('fname','','R','lname','','R','emailid','','NisEmail','address','','R','city','','R','state','','R','country','','R','contactno','','RisNum');return document.MM_returnValue">
    7. I've modified your code into these part:
      Code:
      window.onload=function(){
      document.form1.onsubmit=function(){
      var req=['fname','lname','genderF','genderM','address','city','state','country','contactno'], // The required elements except for the dropddown and checkbox
      email=document.form1.emailid, // Set the email field
      dd=document.form1.DD, // Set the dd dropdown list
      mm=document.form1.MM, // Set the mm dropdown list
      yyyy=document.form1.YYYY, // Set the yyyy dropdown list
      checkbox=document.form1.checkbox; // Set the checkbox name
      for(var i=0;i<req.length;i++)
      	{
      	var name=document.form1.elements[req[i]];
      	if(name.value=='')
      	{alert('Please fill '+name.name+' field.');name.focus();return false;}}
      if (!(/^([a-z0-9])([\w\.\-\+])+([a-z0-9])\@(([\w\-]?)+\.)+([a-z]{2,4})$/i.test(email.value))){alert('Please fill in the correct email address.');email.focus();return false;}
      if(dd.value=='DD'||mm.value=='MM'||yyyy.value=='YYYY'){alert('Please update the birthday dropdown list');return false;}
      if(checkbox.checked==false){alert('Please check the checkbox');return false;}
      return;}
      }
      Together with the modification is:
      • Validate the email.
      • Validate the checkbox.
      • Combine those two scripts into one.
      • Separate JS from our markup.
    8. Here's a complete modificaion depecting above notes:
      HTML Code:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Untitled Document</title>
      <script type="text/JavaScript">
      <!--
      window.onload=function(){
      document.form1.onsubmit=function(){
      var req=['fname','lname','genderF','genderM','address','city','state','country','contactno'], // The required elements except for the dropddown and checkbox
      email=document.form1.emailid, // Set the email field
      dd=document.form1.DD, // Set the dd dropdown list
      mm=document.form1.MM, // Set the mm dropdown list
      yyyy=document.form1.YYYY, // Set the yyyy dropdown list
      checkbox=document.form1.checkbox; // Set the checkbox name
      for(var i=0;i<req.length;i++)
      	{
      	var name=document.form1.elements[req[i]];
      	if(name.value=='')
      	{alert('Please fill '+name.name+' field.');name.focus();return false;}}
      if (!(/^([a-z0-9])([\w\.\-\+])+([a-z0-9])\@(([\w\-]?)+\.)+([a-z]{2,4})$/i.test(email.value))){alert('Please fill in the correct email address.');email.focus();return false;}
      if(dd.value=='DD'||mm.value=='MM'||yyyy.value=='YYYY'){alert('Please update the birthday dropdown list');return false;}
      if(checkbox.checked==false){alert('Please check the checkbox');return false;}
      return;}
      }
      function MM_findObj(n, d) { //v4.01
      var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
      }
      //-->
      </script>
      </head>
      <body>
      <form action="db.jsp" method="post" name="form1">
      <table style="width:779px" border="2" cellpadding="2" cellspacing="2">
      <tr><td style="width:579px;height:158px">&nbsp;</td></tr>
      <tr bgcolor=""><td style="height:64px">&nbsp;</td></tr>
      <tr><td style="height:68px">Fname: <input type="text" name="fname" /></td></tr>
      <tr><td style="height:64px">Lname: <input type="text" name="lname" /></td></tr>
      <tr><td style="height:56px"> Date of birth:
      <select name="DD">
      <option value="DD">DD</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
      <option value="24">24</option>
      <option value="25">25</option>
      <option value="26">26</option>
      <option value="27">27</option>
      <option value="28">28</option>
      <option value="29">29</option>
      <option value="30">30</option>
      <option value="31">31</option>
      </select>
      <select name="MM">
      <option value="MM">MM</option>
      <option value="jan">jan</option>
      <option value="feb">feb</option>
      <option value="mar">mar</option>
      <option value="apr">apr</option>
      <option value="may">may</option>
      <option value="june">june</option>
      <option value="july">july</option>
      <option value="aug">aug</option>
      <option value="sep">sep</option>
      <option value="oct">oct</option>
      <option value="nov">nov</option>
      <option value="dec">dec</option>
      </select>
      <select name="YYYY">
      <option value="YYYY">YYYY</option>
      <option value="1980">1980</option>
      <option value="1981">1981</option>
      <option value="1982">1982</option>
      <option value="1983">1983</option>
      <option value="1984">1984</option>
      <option value="1985">1985</option>
      <option value="2000">2000</option>
      <option value="2006">2006</option>
      <option value="2007">2007</option>
      <option value="2008">2008</option>
      </select> </td>
      </tr>
      <tr>
      <td style="height:11px">Gender:<input name="genderM" type="radio" value="Male"/>Male<input name="genderF" type="radio" value="Female"/>Female</td></tr>
      <tr><td style="height:65px">Emailid:<input type="text" name="emailid"/>
      </td></tr>
      <tr><td style="height:55px" >Address: <input type="text" name="address" />
      </td></tr>
      <tr><td style="height:54px" >City:<input type="text" name="city"/></td></tr>
      <tr><td style="height:55px;" >State:<input type="text" name="state"/></td></tr>
      <tr><td height="72" >Country:<input type="text" name="country" /> </td></tr>
      <tr><td style="height:49px;">Contact no.<input type="text" name="contactno"/></td></tr>
      <tr><td style="height:53px;" ><input name="checkbox" type="checkbox" value="checked" />I agree terms and conditions.</td></tr>
      <tr><td style="height:47px;"><input type="submit" name="submit" value="Register Me" /></td></tr>
      </table>
      </form>
      </body>
      </html>


    Hope it helps.
    Last edited by rangana; 08-01-2008 at 03:25 AM.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  7. #7
    palavi's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    14

    Smile Re: validating the checkbox,list/menu..

    thank you very much i am very happy. its working dude.. thank u very much for ur help . do u work in dreamweaver?? i am new to use dreamweaver so i have one doubt probably u may help i have to implement standalone travel software which includes entring name,age,phoneno, customer,arranging for driver and udating it into database.i require to design front end and back end i know database i can use Mysql or MS access. which development tool i shud use???
    1) plain html static pages i can create i shud install tomcat server to the client's machine also or
    2) shall i use applets swings for front end since standalone but quieet new to me...
    thanks in advance

  8. #8
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: validating the checkbox,list/menu..

    You're welcome. Glad I could help.

    I'm not working in dreamweaver. I'm just a freelancer and a student at the same time.

    I'm sorry, but I don't have idea about MS access so if I were to ask, I would go on mysql. Apparently, server-side is not my forte much more not with database so you would'nt get good advice from me.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  9. #9
    palavi's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    14

    Re: validating the checkbox,list/menu..

    that's ok no probs thank you