...

View Full Version : Reading "value" of a ASP.NET created treenode



utkuozan
01-13-2007, 10:15 AM
I have a treeview object created and populated in .NET in ASP.NET. Each element on the treeview has a text and a spesific id, that's hold in the "value" property. When I right-click the treeview on page I would like to get the "value" of the node clicked.

I guess it would be something like this:

document.onmousedown=clickIE4;


function clickIE4()
{
if (event.button==2)
{
var MySrc = event.srcElement

alert(MySrc.????????)

return false;
}
}

what shouod be inserted instead of ???????? in order to properly display the "value" of the node that is clicked?

Shaffer
01-13-2007, 06:25 PM
mySrc.node.value ?

Ancora
01-14-2007, 11:50 AM
utkuozan:

Try:



alert(MySrc.firstChild.data)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum