SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist tangledman's Avatar
    Join Date
    Sep 2005
    Location
    Puerto de Mazarron, Murcia, Spain
    Posts
    425
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript error

    Hi Sitepointers,

    I built a website for my sister over the weekend.

    www.chillingtonhouse.co.uk

    In IE it says there is a javascript error.

    What is the best way to debug this?
    What is the error?
    How do I fix it?

    Thanks

    Will

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,713
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    The error also occurs in other web browsers too.

    IE has developer tools from where you can debug the javascript. Other web browsers have similar javascript consoles.

    The error is that firstChild is trying to be applied to null, instead of an element.
    It looks like gg() cannot get the firstChild property of the a variable. gg() is called by df(), which in turn is called by ew(), which is loaded as a part of the google maps protocol.

    Here's the root cause of your trouble.

    Code javascript:
    var map = new GMap2(document.getElementById("map"));

    You have no element with a unique identifier of "map"
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •