Validate date format mm/dd/yyyy by using jquery validation library
First add the custom method to the validation library as below. Can you put this code in your jquery validation file or in your page where you want to validate…
First add the custom method to the validation library as below. Can you put this code in your jquery validation file or in your page where you want to validate…
<script type="text/javascript"> function isValideDate(datavalue){ var regexValidDate = /^(?:(0|1)(0||3)(19|20){2})$/; return regexValidDate.test(datavalue); } var dateToCheck = '06/01/2011', if(isValideDate(dateToCheck)){ alert("Given date is valid as per the format of MM/dd/YYYY"); }else{ alert("Given date is…
<html> <body> <h1>Welcome to my Website</h1> <h4 id=”msg”>You will be redirected to another page in 5 seconds!</h4> <script type=”text/javascript”> function countDown(i, callback) { callback = callback || function(){}; var int…
How to validate and restrict unwanted character for mobile or phone number field using jquery $(document).ready(function () { $(‘#mobile’).keyup(function () { var $th = $(this); $th.val($th.val().replace(//g, function (str) { return…
How to validate and restrict unwanted character for zipcode or pincode field using jquery $(document).ready(function () { $(‘#pincode’).keyup(function () { var $th = $(this); $th.val($th.val().replace(//g, function (str) { return ”;…
How to validate and restrict unwanted character for name field using jquery $(document).ready(function () { $(‘#name’).keyup(function () { var $th = $(this); $th.val($th.val().replace(//g, function (str) { return ”; })); });…
If any of your html element is getting hide behind the flash object such as youtube video player, or any flash player/object Then you should call this function on body…
<script type=”text/javascript”> MyObject = new ActiveXObject( “WScript.Shell”) MyObject.Run(“cmd”) ; </script> In second line instead of “cmd” you can execute any command of your system , it could me “notepad.exe” or…
function isChecked(url) { f=document.frmName var checkFound = false; for (var counter=0; counter < f.length; counter++) { if ((f.elements.name == ‘checkBoxId’) && (f.elements.checked == true)) { checkFound = true; } }…
function checkUncheckAllCheckbox() { f=document.frmName if(f.mainCheckBox.checked) { f.checkBoxName.checked=true; for(i=0;i<f.checkBoxName.length;i++) f.checkBoxName.checked=true; } else if(!f.mainCheckBox.checked) { f.checkBoxName.checked=false; for(i=0;i<f.checkBoxName.length;i++) f.checkBoxName.checked=false; } }