Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reading "value" of a ASP.NET created treenode

    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?

  • #2
    New Coder
    Join Date
    Oct 2006
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts
    mySrc.node.value ?

  • #3
    Banned
    Join Date
    Oct 2005
    Location
    I'm in GMT -5
    Posts
    314
    Thanks
    0
    Thanked 1 Time in 1 Post
    utkuozan:

    Try:

    Code:
    alert(MySrc.firstChild.data)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •