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

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

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

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

Comments Off

IFrame Injection Attack is considered one of the most common and most basic cross site scripting (XSS) attacks. If you have recently got an iframe attack to your website, do not panic. Here are a few things that you can do immediately after you discovered that your website has been a victim of an iframe [...]

Continue reading Troubleshooting an IFrame Injection Attack

1. Firefox I recommend Firefox as a primary browser for anyone, whether you are a Designer, Developer or Consultant. Not only does Firefox have fewer security vulnerabilities compared to Internet Explorer, it loads websites faster, and there are a lot of free Add-Ons that you can install to add extra functionalities to the browser. 2. [...]

Continue reading Useful Tools and Tips for Search Engine Optimisation Consultants

Comments Off

After optimising a few web 2.0 websites for speed and download time, I would like to share with everyone some of the tips I have learned and implemented during the process. 1. Use image sprites If you use a lot of background images in CSS, it’s a good practice to put all the images you [...]

Continue reading 10 Website Optimisation Tips for Web 2.0 Websites

HTML code: <form action="login.php" method="post" id="login"> <fieldset> <legend>Login</legend> <label for="username" class="label">Username</label> <input type="text" name="username" id="username" class="text" maxlength="30" /> <label for="password" class="label">Password</label> <input type="password" name="password" id="password" class="text" maxlength="30" /> <input type="checkbox" name="remember" id="remember" /> <label for="remember">Remember me</label> <input type="submit" name="submit" value="Login" /> </fieldset> </form> Javascript code: The first javacript snippet will be used to store username [...]

Continue reading Store login information in cookie using jQuery

Code: <!–[if IE 6]> Internet Explorer 6 <![endif]–> <!–[if IE 7]> Internet Explorer 7 <![endif]–> <!–[if lt IE 7]> A version of Internet Explorer which is older than 7 <![endif]–> <!–[if gt IE 6]> A version of Internet Explorer which is newer than 6 <![endif]–> <!–[if gte IE 7]> A version of Internet Explorer which [...]

Continue reading Conditional IE Comments (to detect IE browser / IE browser version)

Download Virtual PC 2004 or Virtual PC 2007 onto your computer (Windows XP or Windows Vista) Unzip and double-click on Microsoft Virtual PC 2004 MSDN.msi to install the Virtual Machine using the Installation Wizard Download Windows XP SP3 with IE6 VHD file from Internet Explorer Application Compatibility VPC Image Double-click on IE6-XPSP3.exe to install IE6 [...]

Continue reading Step-by-step instructions on how to set up a Virtual PC and install IE6 (or IE7, IE8)

Profile PicHello! 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 about me or have a look at some of the tips & resources I've written.
Subscribe to our newsletter to receive tips, resources and special offers related to web development & design.
We do NOT spam.
Your name:  
Your email:  

Tips & Resources

Tips & Resources
WordPress Web Hosting
Recommended web hosting providers for WordPress 3.0
iPhone Native App Development
Important steps into iPhone app development for beginners
iPhone Web App Development
Tips for iPhone web app development
Coupons for Web Developers
Get discounts on web hosting, domain names, templates, etc
10 Useful jQuery Snippets
Easy-to-use jQuery snippets for any website
HTML Email Newsletter
Step-by-step tutorial on how to code an HTML email newsletter
  • bluehost Hosting $6.95/month
  • Joomla Templates