Hi all,
I am creating a folder tree using xml,xsl,javascript...
In that - I am passing the div tag object to a function as an argument named for intstance as diventity
in javascript what does the following code does...
function expand(diventity) {
var oImage
oImage = entity.childNodes(0).all["image"]--- What does this code does .
oImage.src = entity.imageOpen
}
Java script syntax doubt
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jaish MathewsRank #225 · 11K reputationPosted Jul 17, 2010, 9:24 AM EDT
1st of all the result will be, oImage will contain all HTML elements with an ID of "image" under 1st child element of the passed DIV. But it won't search for any HTML element with TAG "Image". For that need to use below line
entity.childNodes(0).getElementsByTagName("img");
This will return all image tags under 1st child of the passed DIV
jayaprakash R10 reputationPosted Jul 20, 2010, 9:26 PM EDT
Jaish MathewsRank #225 · 11K reputationPosted Jul 21, 2010, 12:10 AM EDT
NP. If it's fine, close the thread by accepting it