to check alphanumeric character
function isAlphaNumeric(valueToTest) { var myRegxp = /^+$/; if(myRegxp.test(valueToTest) == 1) { return true; } else { return false; } }
function isAlphaNumeric(valueToTest) { var myRegxp = /^+$/; if(myRegxp.test(valueToTest) == 1) { return true; } else { return false; } }
function checkTextLength(obj,restrictLength,truncFlag) { if(obj.value.length>restrictLength){ if(truncFlag) obj.disabled = true; alert(“Text should not be more than ” + restrictLength + ” characters”); if(truncFlag) obj.disabled = false; obj.focus(); if(truncFlag) obj.value = obj.value.substring(0,restrictLength); return…
function trim(sString) { sTrimmedString = “”; if (sString != “”) { var iStart = 0; var iEnd = sString.length – 1; var sWhitespace = ” \t\f\n\r”; while (sWhitespace.indexOf(sString.charAt(iStart)) != -1)…
function isValidCreditCard(cardNo) { var str=cardNo; var digitsOnly = str.replace(/ /g,”);//replace unwanted space var sum = 0; var digit = 0; var addend = 0; var timesTwo = false; var i;…
<?php class parseHTML { /** * HTML Form Parser * * @package HtmlFormParser * @version $Id 1.0 * @author Vinod Ram *$html_data is the content of html file that you…
<?php function get_time_differenceFromToday($fromDate) { $uts = strtotime( $fromDate );//date format YYYY-MM-DD HH:MM:SS $uts = time();//unix timestamp //strtotime( $end ) if( $uts!==-1 && $uts!==-1 ) { if( $uts >= $uts )…