Archive for the 'JavaScript' Category
How to get url with Jquery and PHP
0 Comments Published February 24th, 2010 in JavaScript, PHP, Programming Tags: No Tags.current URL in address bar
PHP
$pageURL= $pageURL= $_SERVER["REQUEST_URI"].$_SERVER["REQUEST_URI"];
Jquery
$(document).ready(function() {
var pathname = window.location.pathname;
alert (pathname);
});
Jquery Image area select Z-index issue
0 Comments Published February 8th, 2010 in JavaScript, Programming Tags: No Tags.If you try using PHP & jQuery image upload and crop [http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/]
with some sort of modal like popup functionality, you will notice that the imgareaselect selection does not have proper zindex value,
although this plugin is using 0.6 version and 0.8/0.9 claims to have added zindex option, still doesnt seem to work
so grab 0.6 from link [...]
Add more emails to send mail / multiple recipients / refer a friend
1 Comment Published August 18th, 2009 in JavaScript, Programming Tags: No Tags.If you need to add several emails, to refer a friend without asking the user to add all in separated by commas !
Code below provides separate field, where user can add individual email and press ADD, emails are then added automatically, separated by a comma “,” . There is an extra comma at the end [...]
Jquery/PHP Irish mobile number validation [regular expressions]
0 Comments Published July 28th, 2009 in JavaScript, PHP, Programming Tags: No Tags.PHP
<?php
$pattern = "/^(083|086|085|086|087)\d{7}$/";
$phone = "087343266";
if (preg_match($pattern,$phone)) echo "Match";
else echo "Not match";
Jquery
$.validator.addMethod("phoneNumber", function(value, element) {
return /^(083|086|085|086|087)\d{7}$/.test(value);}, " Not Valid");
$(document).ready(function(){
$("#reg").validate({
rules: {
mobile:{required:true,
number:true,
minlength:10,
phoneNumber:true
}},
Categories |
||||
Latest Photos on Flickr |
||||






