function mainvalidation() { alert("1"); var select_time = document.getElementById('<%=SelectTimeZone.ClientID %>'); var select_grade = document.getElementById('<%=DropDownListLevel.ClientID %>').nodeValue.toString(); var select_area = document.getElementById('<%=DropDownListArea.ClientID %>').nodeValue.toString(); var select_subject = document.getElementById('<%=DropDownListSubject.ClientID %>').nodeValue.toString(); var uemail = document.getElementById('<%=TxtEMailID.ClientID %>').nodeValue.toString(); var uname = document.getElementById('<%=TxtName.ClientID %>').nodeValue.toString(); if (select_time == "" || select_time == "Select Time Zone") { alert("Select Time Zone"); return false; } if (select_grade == "" || select_grade == "Select Grade") { alert("Select Grade"); return false; } if (select_area == "" || select_area == "Select Area") { alert("Select Area"); return false; } if (select_subject == "" || select_subject == "Select Subject") { alert("Select Subject"); return false; } if (uname == "" || uname == "Enter Your Name ...") { alert("Enter Your Name"); return false; } if (uemail == "" || uemail == "Enter Your e-mail ...") { alert("Enter Email ID"); return false; } var emailPat = /^(\".*\"|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/ var EmailmatchArray = uemail.match(emailPat); if (EmailmatchArray == null) { alert("Your email address seems incorrect. Please try again."); return false; } }
var select_time = document.getElementById('<%=SelectTimeZone.ClientID %>');
<br /> var select_time = document.getElementById('<%=SelectTimeZone.ClientID %>');<br /> var txt=select_time.options[select_time.selectedIndex].text;<br /> var val=select_time.options[select_time.selectedIndex].value;<br /> <br />
var select_time = document.getElementById('<%=SelectTimeZone.ClientID %>').values;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)