Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    stw
    stw is offline
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 'done with errors on page' ???

    Hi everyone. I have a piece of javascript, but when the page is published i get an error message in the corner saying 'done with errors on page', then when i click on it i get the following message : line: 128, char: 0, error message: 'desriptions' is unidentified. (you can see the page at www.sunnydelights.com/napleshomes.htm). I am now stumpt as what to do, please help. Thanx.

  • #2
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by stw
    'desriptions' is unidentified.
    You have a variable that is most likely named descriptions and then, in another part of your script you tried to reference it but spelled it wrong.
    Moderator @ WebDeveloper.com
    Mentor @ WebXpertz.net

  • #3
    stw
    stw is offline
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanx for that, but there doesnt seem to be anything mispelled, any other suggestions??

  • #4
    stw
    stw is offline
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ooops but...

    Sorry i doesnt say 'unidentified', it says 'undefined'. Hope that makes a difference. Thanx.

  • #5
    Regular Coder
    Join Date
    Apr 2003
    Location
    Atlanta, GA
    Posts
    487
    Thanks
    0
    Thanked 0 Times in 0 Posts
    At some points, you refer to an object called "descriptions" and attempt to access its innerHTML object.

    The "descriptions" object you're trying to reference does not exist in the script.

    I also see in your script that you at times refer to document.getElementById("descriptions").innerHTML - this is better, because you're now actually referring to an HTML element on the page.

    Simply by virtue of being assigned an id of "descriptions" does not enable a global reference of "descriptions" to that object (it's a span on your page); otherwise, we wouldn't have the very function you use: document.getElementById().

    My recommendation to you is to make the first line of your function(s?) look like this:
    Code:
    var descriptionSpan = document.getElementById("descriptions");
    , then replace your script's references to "descriptions" with descriptionSpan.

  • #6
    stw
    stw is offline
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what i think has happened is that the code originally came with a function that when you select a option from the drop down box, it then displayed a description to go with it. I removed the descriptions as i did not want it, but it seems as if i havent removed the coding for that. Basically i dont need that function in the coding, all i need is to select an option form the drop down box and then go that selected page. rather than re-code the 'descriptions' problem iam having would it be easier just to remove it completely??? Thanx.


  •  

    Posting Permissions

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