WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Strange Javascript Error Message (10 posts)

  1. jspirko
    Member
    Posted 8 years ago #

    I am by no means a programmer and have added many plugins to my WordPress installation.

    When I view my site using Internet Explorer, I receive a script error on the page (which does not say much I might add):

    Line: 83
    Char: 2
    Error: 'null' is null or not an object
    Code: 0
    URL: http://test.spirko.net/vw

    The strange thing is I do not receive this error using FireFox. I understand this is not that much information, but I really could use anybody's help.

  2. jwurster
    Member
    Posted 8 years ago #

    What version of IE are you using?

  3. jspirko
    Member
    Posted 8 years ago #

    Version: 6.0.2900.2180.xpsp_sp2_gdr.050301-1519

    Thanks.

  4. jwurster
    Member
    Posted 8 years ago #

    I would search the Microsoft forums. I did see some references when I did a google search on that error. Can you identify your plugins that use javascript?
    Maybe also try a hard refresh (Ctrl-F5) to see if the error goes away.

    I have the same IE version and don't get that error when I go to your site.

  5. jspirko
    Member
    Posted 8 years ago #

    Thanks, I will try that. I just did't know where to start since this is such a generic error.

    One good thing is it doesn't seem to be affecting anything.

  6. VaamYob
    Member
    Posted 8 years ago #

    You guys need to dump IE and get a more developer friendly browser.

    your error is in livepreview.js and thus, the livepreview plugin:

    var commentArea = document.getElementById('comment');
    commentArea.onkeyup = function(){

    commentArea is null because there is no comment form element.

    You can fix it by just adding a :

    if (commentArea != null) {
    commentArea.onkeyup = function(){
    ...
    }
    }

    Oh, and don't forget to tell the plugin developer about the issue.

  7. Austin Matzko
    Member
    Posted 8 years ago #

    Edit: hadn't yet seen the immediately prior post before posting this;
    ----------------------------

    On your site I get the following error in Firefox:

    "Error: commentArea has no properties
    Source File: http://test.spirko.net/vw/wp-content/plugins/livepreview.js
    Line: 82"

    The JavaScript is looking for something with id of "comment" and not finding it.

  8. jspirko
    Member
    Posted 8 years ago #

    VaamYob:

    Thanks for your help...that worked perfectly!!!

    I will notify the plugin author as well.

    Thanks Again ;-)

  9. hasund
    Member
    Posted 7 years ago #

    I use the same plugin as jspirko and I get the same error message in IE. I tried VaamYob's fix (even copying jspirko's modified script directly), but to no avail. The error is reproduced on two different blogs with different setups.

  10. kylew
    Member
    Posted 7 years ago #

    im getting the same null error but not from that pluggin.

Topic Closed

This topic has been closed to new replies.

About this Topic