Gautam Buddha Temple Varanasi,Varanasi - Buddhist Pilgrimage

Tuesday, August 24, 2010

JavaScript validation for dropdownlist

 JavaScript validation for dropdownlist  
 This example show how dropdownlist should be selected using javascript.  
   
 function validate()  
 {   
 var ddlCountry = document.getElementById('<%=ddlParameter.ClientID%>');   
 if(ddlCountry.value==0)  
 {  
 alert("Not Selected..!");  
 ddlParameter.focus();  
 return false;  
 }   
 return true;   
 }  
 Thanks & Regards  
 Santosh Singh  

2 comments: