URL validation
function checkURL(url) { var theurl=url; var tomatch= /^(http?:\/\/|ftp:\/\/)(www\.)?+\.(com|org|net|mil|edu|ca|co.uk|co.in|com.au|ac.in|gov|gov.in)(\/)?/; if (tomatch.test(theurl)) { return true; } else…
Read Morefunction checkURL(url) { var theurl=url; var tomatch= /^(http?:\/\/|ftp:\/\/)(www\.)?+\.(com|org|net|mil|edu|ca|co.uk|co.in|com.au|ac.in|gov|gov.in)(\/)?/; if (tomatch.test(theurl)) { return true; } else…
Read Morefunction echeck(str) { var at=”@” var dot=”.” var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){…
Read Morefunction isAlphaNumeric(valueToTest) { var myRegxp = /^+$/; if(myRegxp.test(valueToTest) == 1) { return true; } else…
Read Morefunction checkTextLength(obj,restrictLength,truncFlag) { if(obj.value.length>restrictLength){ if(truncFlag) obj.disabled = true; alert(“Text should not be more than ”…
Read Morefunction trim(sString) { sTrimmedString = “”; if (sString != “”) { var iStart = 0;…
Read Morefunction isValidCreditCard(cardNo) { var str=cardNo; var digitsOnly = str.replace(/ /g,”);//replace unwanted space var sum =…
Read More