-
Jquery functions for event!!
Monday, 26 November 2012
$(document).ready(function(){$("#yourid").focusout(function() {alert('coding here');});});Posted by Unknown at 23:24 | Labels: jquery | 0 comments | Email This BlogThis! Share to X Share to Facebook |
-
$('#yourElementId').attr('title', 'your new title');var assign = $('#yourElementId').attr('title');Posted by Unknown at 23:17 | Labels: jquery | 0 comments | Email This BlogThis! Share to X Share to Facebook |
-
Cake php!! Passing parameter using form submit.
Friday, 9 November 2012
Paasing parameter and submitting image using form
<?php echo $this->Form->create('Deal', array('url' => array($mid,$mname),'type' => 'file'));?>Posted by Unknown at 01:32 | Labels: cakephp | 0 comments | Email This BlogThis! Share to X Share to Facebook |
-
To test like button in website
https://developers.facebook.com/tools/debug
Multiple like button in a page
http://hillarsaare.com/multiple-facebook-like-buttons-on-one-page/
Meta tag for like button
http://blog.smartwebsitetips.com/75/how-to-force-facebook-choose-right-image-for-like-button/Posted by Unknown at 01:18 | Labels: plugin | 0 comments | Email This BlogThis! Share to X Share to Facebook |
-
Php date difference!!
Thursday, 8 November 2012
Php date difference between sql date and current date:
<?php $curtime = date("Y-m-d H:i:s"); // Mysql date format
$endtime = $sd['denddate'];
$ts1 = strtotime($curtime);
$ts2 = strtotime($endtime);
$diff = ($ts2 - $ts1)/3600/24;
echo round($diff); ?>Posted by Unknown at 01:51 | Labels: php | 0 comments | Email This BlogThis! Share to X Share to Facebook |
-
Php email validation!!
Tuesday, 6 November 2012
<?php
$email_a = 'joe@example.com';
if (filter_var($email_a, FILTER_VALIDATE_EMAIL)) {
echo "This (email_a) email address is considered valid.";
}
?>
Using regular expression
<?php
ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]",
$email);
?>Posted by Unknown at 02:11 | Labels: php | 0 comments | Email This BlogThis! Share to X Share to Facebook |
-
Php to generate random numbers!!
Thursday, 1 November 2012
Random string generation
function generateRandomString($length = 10) { // to generate rendom strings
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
//refer :http://stackoverflow.com/questions/4356289/php-random-string-generator
}
Posted by Unknown at 23:50 | Labels: php | 0 comments | Email This BlogThis! Share to X Share to Facebook |