Category Archives: Code Snippets / Functions

JavaScript: Basic, Multi-Dimensional & Associative Arrays

Arrays are an amazingly useful variable in all programming languages, they allow you to store vast amounts of organised data in just one reference. This helps not only on software memory usage and speed – But also on program complexity …

Read more »

PHP: Only variable references should be returned by reference

Pulling your hair out over this Notice message? Well here is an explanation for why you are getting this and how you can avoid it. Take a look at the following code: <?php class myClass { public $var = 1; …

Read more »

Using Google Analytics on AJAX Requests

Google Analytics is a great way to track the visitors on your websites, however what if you are using AJAX for website navigation? Fortunately Google have everything under control, you can easily tell Analytics that the user is loading another …

Read more »

AJAX loaded content not visible in IE7 + IE8 with jQuery

Recently I have had a nightmare of a problem with an apparent rendering bug in IE7 + IE8 which had all the hallmarks of the “peakaboo bug”. Firstly, here is a quick explanation of my problem: AJAX fetches content into …

Read more »

Google Affiliate Network Banner Rotation Script

I have a very useful script for people who wish to monetize from the Google Affiliate Network. Are you sick of managing your banners manually? Adding/removing banners as you join/leave affiliates? Or are you looking to use Google Affiliate Network …

Read more »

JavaScript: Changing the page title with JavaScript

So this is something I was implementing today. And as I usually do with these sorts off tasks, I did a search on Google to see if there were good/bad methods to accomplishing the task I required. However the first …

Read more »

CSS: Using custom fonts in websites

Ok, so I thought this was not possible, but in fact it is possible for you to reference a custom font file for a website using CSS… Not only does it works for all the latest browsers, but you can …

Read more »

JavaScript: Change address bar URL when loading content with AJAX

Isn’t it annoying when you have a website that uses AJAX to load each page of the site, but the URL in the address bar just stays as the URL to the entry page to the site? Well it’s not …

Read more »

Javascript: Google MarkerCluster – Stop the first marker from clustering

Recently I have been working on a project for work that allows customers to book train tickets and a hotel in one package (saving them money), how the system is working is the user first selects there train travel, after …

Read more »

506342_Wanted 468x60

JavaScript: Page scrolls when you use scroll wheel on Google Maps

Firefox (and perhaps other browsers) seems to have a bug when it comes to using the scroll wheel on an embedded Google Map. Quite often the page will also scroll when you use the wheel to zoom in and out, …

Read more »


506361_Who 728x90 Men