Code Snipet
javaScript / .NET / C#
var mydata=document.SignUP.txtZ... the name of the form is “SignUp” and name of the text field on which i want to enforce numerical characters is “txtZip“ for(var i=0;i < mydata.length;i++) { var mydigit = mydata.charAt(i); if(mydigit < "0" || mydigit > "9") { alert('Please Enter a Numeric value'); document.SignUP.txtZip.focu... return false; } }...
I just have notices that you can't access hyperlink as usually you access other serverside controls. Suppose there is a Server side TextBox named “txtBox” you will Access it in javaScript as [document_name].[form_name]... document.form.txtBox.value here is assume that the name of my Server Side Text box is “txtBox“ and the name of my Form is “form“ okie this is the normal procedure . you can't Access Server Side in the same fashion. As it is rendered...
function validateEmail(strEmail) { var at="@" var dot="." var lat=strEmail.indexOf(at) var lstr=strEmail.length var ldot=strEmail.indexOf(dot) if (strEmail.indexOf(at)==-1) { alert("Invalid E-mail ID") return false } if (strEmail.indexOf(at)==-1 || strEmail.indexOf(at)==0 || strEmail.indexOf(at)==lstr) { alert("Invalid E-mail ID") return false } if (strEmail.indexOf(dot)==-1 || str.indexOf(dot)==0 || strEmail.indexOf(dot)==lstr) { alert("Invalid E-mail ID") return false } if (strEmail.indexOf(at,(lat+1...