Oct
31
Posted on 31-10-2007
Filed Under (JavaScript) by Johan Känngård

Internet Explorer does not have an indexOf method in the Array object. Here is how you can add your own:


if(!Array.indexOf){
  Array.prototype.indexOf=function(o){
    for(var i=0;i<this .length;i++)
      if(this[i]==o) return i;
    return -1;
  }
}

Use it like this:

var a=new Array(\'aaa\',\'bbb\',\'ccc\');
alert(a.indexOf(\'bbb\')); // Shows 1 as it is the index of \'bbb\' in the a Array.
alert(a.indexOf(\'b\')); // Shows -1 since \'b\' is not a member of the a Array.

(0) Comments    Read More   
Oct
29
Posted on 29-10-2007
Filed Under (Fun) by Johan Känngård
(0) Comments    Read More   
Oct
22
Posted on 22-10-2007
Filed Under (Fun) by Johan Känngård
(0) Comments    Read More   
Oct
20
Posted on 20-10-2007
Filed Under (Photographing) by Johan Känngård



MOM

Cool neon light sign at Café Momo in Handen city.

(0) Comments    Read More   
Oct
16
Posted on 16-10-2007
Filed Under (Fun) by Johan Känngård
(0) Comments    Read More   
Oct
15
Posted on 15-10-2007
Filed Under (Fun) by Johan Känngård
(0) Comments    Read More   
Oct
10
Posted on 10-10-2007
Filed Under (Fun) by Johan Känngård
(0) Comments    Read More   
Oct
09
Posted on 09-10-2007
Filed Under (Life, Photographing) by Johan Känngård

The old Ragunda church, seen from a distance

This was shot on one of our summer vacation days in the middle of nowhere a.k.a. Jämtland :-)

(0) Comments    Read More