Archive for May, 2014|Monthly archive page

IE7 and IE8’s indexOf() Array Bug

If you try to use indexOf() to check the existence of an Array member in <IE9 the script will fail. This is because the Array class in <IE9 does not have the function indexOf() built into it. This is not amazing.

To render this problem obsolete you could use the jQuery inArray() method, although then you are dependent on jQuery being in existence – http://api.jquery.com/jquery.inarray/

Or, alternatively you could just add indexOf onto the Array prototype if it doesn’t exist using something like this:-

// <IE9 indexOf() fix
if (!Array.indexOf) {
  Array.prototype.indexOf = function (obj, start) {
    for (var i = (start || 0); i < this.length; i++) {
      if (this[i] == obj) {
        return i;
       }
    }
   return -1;
  }
}

Bristol Bridal Boutique

Image

I’m very excited to announce my wife’s new business – Bristol Bridal Boutique. The website has just gone live:-

http://bristolbridalboutique.co.uk

Bristol Bridal Boutique stocks sample and second-hand designer wedding dresses by exceptional designers such as Jenny Packham, Suzanne Neville, Lusan Mandongus, Stephanie Allin, Sassi Holford and more.  All the gowns are samples sourced from bridal boutiques or are once-worn.”