var input = “hello222″; var ok = false; var dob_regex = /^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/; // DD/MM/YYYY var email_regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/; // email address var username_regex = /^[\w.-]+$/; // allowed characters: any word . -, ( \w ) represents any word character (letters, digits, and the underscore _ ), equivalent to [a-zA-Z0-9_] var num_regex = /^\d+$/; // numeric [...]
Continue reading 10 Examples of Basic Input Validation in Javascript
According to this website, Internet Explorer* still makes up the largest share this year (2009). The top 5 browsers are as follows: Microsoft Internet Explorer 66.97% Firefox 21.96% Safari 8.20% Chrome 1.22% Opera 0.70% *This includes all versions of Internet Explorer. Source: Market share for browsers, operating systems and search engines
Continue reading Browser Market Share (Year 2009)
HTML: <a href="http://www.google.com" rel="external">Google</a> Javascript: $(document).ready(function() { $("a[rel=external]").attr(‘target’, ‘_blank’); }); Or $(document).ready(function() { $(‘a[rel="external"]‘).click( function() { window.open( $(this).attr(‘href’) ); return false; }); });
Continue reading Open link in a new window using jQuery
You will need to sign up for the Google Maps API key and replace “INSERT_API_KEY_HERE” with your API key. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Google Map and Street View</title> <script src="http://maps.google.com/maps?file=api&v=2&key=INSERT_API_KEY_HERE" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ function load() { if (GBrowserIsCompatible()) { var lat = [...]
Continue reading Code to embed Google Map and Street View
sIFR sIFR stands for Scalable Inman Flash Replacement and it is an open source JavaScript and Adobe Flash dynamic web fonts implementation, enabling the replacement of text elements on HTML web pages with Flash equivalents. Pros Looks nice Does not require a server side language Text created with sIFR can be copied/selected Graceful degradation (If [...]
Continue reading sIFR vs FLIR – Font Replacement Techniques
Enlarge screenshot That was a screenshot of one of my first homepages on geocities 10 years ago in 1999; the first year it was acquired by Yahoo! as their free web hosting service. As Yahoo! is closing down geocities after 10 years, I can’t help but feel a little sad. I created my first ever [...]
Continue reading My homepage on geocities 10 years ago
There are many ways to style input buttons in CSS. And this is how I do it. HTML <input type=”submit” name=”submit” value=”Send” id=”submit” /> CSS #submit { color: #fff; font-size: 0; width: 135px; height: 60px; border: none; margin: 0; padding: 0; background: #0c0 url(images/send-now.gif) 0 0 no-repeat; } And that’s it, you will have a [...]
Continue reading How to style a Submit button in CSS
22 Apr, 2009
Article: Seven Tips to Building an Online Presence for your Business
Posted in: Web Development Blog
Get a domain name for your business Get an email address with your domain Get a professional website Optimise for search engines Embrace Twitter Add your business to online business directories Add your business to google business centre Read the full article: Seven Tips to Building an Online Presence for your Business
Continue reading Article: Seven Tips to Building an Online Presence for your Business
If file names or page urls of your website have changed during site redevelopment and you are worried about losing your existing search engine rankings, referrals, and bookmarked links, the most efficient solution is to create 301 Redirect to redirect old pages to the new ones. The code “301” means “moved permanently“. There are many [...]
Continue reading How to redirect old pages to new pages using htaccess
$(‘ul.links li a’).click(function(e){ if ($(this).hasClass(‘current’)) { // do nothing } else { // animation and other effects go here } e.preventDefault(); } in jQuery
Continue reading If it is a current link, don’t do anything
Hello! Welcome to Web development blog! My name is Ei Sabai and on this blog, I write about web development, mobile app development, latest web technologies and the likes. Read more 

