Home - Web Developer Blog

Regex validation code for UK postcodes

There are a number of different formats for UK postcodes and validating them can be a hassle. I have now saved you that hassle by providing the postcode Regex validation below. This Regex code will validate UK Postcodes. Feel free to use as you wish ^[A-Za-z]{1,2}[0-9]{1,2} ?[0-9][A-Za-z]{2}$/

mod_rewrite HTTP on all pages by default with HTTPS on selected Pages

For a recent client I needed to force all page views that were not a part of the transaction process to be HTTP so the server load was reduced while ensuring that all pages associated with personal details and the transaction where secured using HTTPS. To do this I utilised mod_rewrite within the .htaccess file. The code used is below. The first section sets the HTTPS connection for specified pages. To target multiple pages the [OR] command is used. The code shows how to select both files such as page1.html and directories via directory/ The second section then sets all … Continue reading

Mootools Labelify Alternative

MooTools

Mootools – Show and Hide input values on click While applying the finishing touches to a Joomla project, I wanted to include some JavaScript code to remove the value from an input field when it has been clicked, and then restore the value afterwards. My usual method of doing this is a free JQuery based script called Labelify that is available under the GNU license. I have always found this script to be extremely effective, efficient and quick to implement. Unfortunately due to Joomla being built around the Mootools JavaScript library, the labelify script conflictedand did not work. After searching … Continue reading

QTabs

For my current project, a Joomla CMS website needed re-developing with a new theme and new features. One of the major new features was the inclusion of JavaScript tabs. The two methods of implementing this in Joomla that I considered are: Edit the template index.php file to link to the relevant JavaScript and CSS files Install a plugin/extension within Joomla to be called from within an article or module I decided to go for what I considered to be the quickest option of installing a plugin first. It was only after I was deleting my fifth useless plugin that I … Continue reading

Net Tuts Code Canyon Get Noticed - $7.99 .Com or .CO from GoDaddy.com!