Page 1 of 1

Embedding images in the LI tag

PostPosted: Thu Dec 14, 2006 8:57 am
by doogsey
I'm trying to embed a small image in each LI tag, after the folder image but before the nodeATag link, but I'm having a lot of trouble getting the tree to play nice.
I've tried simply putting an <img> tag directly after the <li> tag but the tree doesn't like this and fails to expand, giving the error: "parentNode.getElementsByTagName("UL")[0] has no properties".
I've also tried adding an image by doing a document.createElement and inserting the created element before the aTag element in the initTree method, but the browser doesn't like that either.

Is there a simple to do this that I am overlooking?

Any help would be appreciated. Thanks.