Posts

Showing posts with the label magento

Validate Date PHP

For date validation in PHP Try this and enjoy :) <?php function isValid($date) { $date_format = ' d F Y '; $input =$date;   //say ' 11 February 2013'; $input = trim ($input); $time = strtotime ($input); $is_valid = date ($date_format, $time) == $input; return $is_valid ? 'yes' : 'no'; }

Open color box on Page load

This code working with all frameworks.             Required Latest versions of :-                     1-colorbox.js                     2-jquery.min.js                     2- Download                 < script type = "text/javascript" > var j = jQuery.noConflict(); j( document ).ready( function (){ j.fn.colorbox({width : "685px;" ,overlayClose : false , escKey : false , inline : true , href : "#inline_content" }); j( "#cboxClose" ).remove(); }); < /script>