I have implemented tree structure where I get the following error :'(

Error: document.getElementById(treeid) has no properties

Iam not able to correct. Without correcting the error the code works fine, but i have to execure under jquery. And jquery will not accept any error codes. Please help to resolve this problem.

thanka in advance,
devi

> Error: document.getElementById(treeid) has no properties

It simply means that no such object with the ID as 'treeid' (or if 'treeid' is a variable, then the value 'treeid' holds) exists in the document tree.

You are trying to access an object called treeid - and it is not initialized - or is null.

You could have a problem with the scope of the variable - where treeid was defined in a scope that this part of your code cannot see.

Only way you can get better help on this is if you paste more of your code to be evaluated.

jQuery should have nothing to do with this - and you can have errors in your code and jQuery is not affected in any way. The statement jQuery will not accept any error codes really does not make much sense.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.