SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    function is undefined

    I built a javascript error reporter into files that I posted to live sites several weeks ago. I've received a few reports in the error log that show that functions defined in a file loaded via the page headers are showing up as undefined. The pages are viewed many times without these troubles occurring, but they sometimes do. It has happened with IE6 and Firefox 1.5 so I don't think the problem is browser specific. I understood that functions loaded through the header would be available for scripts in the body to use, so I do not think that it could be a timing problem or race condition, but maybe I'm wrong on that???

    Has anyone else observed these types of errors? Any ideas as to the cause and possible solutions?

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds odd.. *shrug*

    So your JavaScript error reporter logs errors on your server? I'm curious how that works. I'm guessing you used some "ajax" techniques?
    I'm available for hire! - www.deftdevelopment.com

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, AJAX is used to report the errors to a php script on the server that logs the error and sends the response.

    The results have been very interesting pointing out a few browser incompatibilities that slipped through and these problems with page loads. I was thinking that the problem with the undefined function might have been due to the file that they are in was not sent by the server for some reason, but this would trigger an error that would be logged, so that doesn't appear to be the cause.

    I'm at a loss for creative ideas on the root cause of the problem!


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
  •