Error on geomap script

Hi,

There was an error on geomap script. It use the getElementsByClassName method, which is no more supported in recent navigators. So I uses this script found on about.com

  /**
   * Implement the getElementsByClassName
   */    
  document.getElementsByClassName = function(cl) {
    var retnode = [];
    var myclass = new RegExp('\\b'+cl+'\\b');
    var elem = this.getElementsByTagName('*');
    for (var i = 0; i < elem.length; i++) {
      var classes = elem[i].className;
      if (myclass.test(classes)) {
        retnode.push(elem[i]);
      }
    }
    return retnode;
  };

You just have to insert this code in the script.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3> <h4> <abbr>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
Spam control
5 + 10 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.