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.
fredmv
10-03-2003, 04:03 PM
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.
Thanx for that, but there doesnt seem to be anything mispelled, any other suggestions??
Sorry i doesnt say 'unidentified', it says 'undefined'. Hope that makes a difference. Thanx.
Choopernickel
10-03-2003, 09:39 PM
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:var descriptionSpan = document.getElementById("descriptions");, then replace your script's references to "descriptions" with descriptionSpan.
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.