Use the following script for getting the jQuery picked date in our format. <script type=”text/javascript”> jQuery(document).ready(function() { jQuery(“.editdatepicker”).datepicker({ dateFormat: “dd-mm-yy”, timeFormat: “HH:mm”, minDate: 0 }); }); </script>
Category: jQuery
jQuery url Validation
When lost focus from the input box the script will check the URL against its Syntax $(‘input’).keydown(function() { if (ischeckUrl($(this))==1){ alert(“enter a valid url…”); } }); //function to check URL function isCheckUrl(checkurl){ if(/^(http|https|ftp)://[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?$/i.test(url)) { return 1; } else { return -1; } }
Search using jQuery and php
Software developers using jQuery search for various occasions. This tutorial is based on zend framework template system. index.phtml <h4 class=”search” >Search . <table border=”0″ cellspacing=”4″> <tr><td>Society Name</td><td width=””><input type=”text” name=”society_name” id=”society_name” style=”width: 155px”></td> <td>Created on</td><td width=””><input type=”text” name=”added_on” id=”added_on” style=”width: 155px”> <script type=”text/javascript”> $(‘#added_on’).datepicker({ dateFormat: “yy/mm/dd”, beforeShowDay: $.datepicker.noWeekends }); </script></td></tr><tr><td></td> <td width=”120″><input type=”button” id=”search-societies_0″ value=”…
How can I disable a button in a jQuery
disable a button in a jQuery jQuery(“#a-create-event”).attr(“disabled”, true); Enable a disabled button in jQuery jQuery(“#a-create-event”).attr(“disabled”, false);