Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] radio button form validation issue


  • From: Travis.Falls at thehartford.com (Falls, Travis D (CASD, IT))
  • Subject: [Javascript] radio button form validation issue
  • Date: Fri Apr 25 14:24:39 2003

Here is my script, the mySurvey[i] is evaluating to undefined, but if I
reference the actual name of the radio button I get the proper amount.  any
ideas?
 
 
<script language="JavaScript" type="text/javascript">
    function validateForm(mySurvey){
         for(i=0; i<mySurvey.length; i++){
  
              if(mySurvey[i].type=="radio"){ 
                   var isSelected=false;
   
                   for(u=0; u < mySurvey[i].length; u++){
                        if(mySurvey[i][u].checked){
                             alert("correct");
                             isSelected=true;
                             return true; 
                        }//ends if
                        else{
                             alert("inCSorrect");
                        } 
                   }//ends for u 
               }//ends if radio 
         } //ends for i 
     return false;
    }//ends function
</script>
 
__________________________________________________________

Travis D. Falls
software engineer

HTSC/CASD/IT
 <mailto:travis.falls@xxxxxxxxxxxxxxx> travis.falls@xxxxxxxxxxxxxxx 
phone: 860.547.4070
fax: 860.723.4463
__________________________________________________________ 
 


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.LaTech.edu/mailman/private/javascript/attachments/20030425/80fdcc32/attachment.html