document.getElementById find nothing

Discussion in 'ASP .Net' started by Franck, Aug 25, 2005.

  1. Franck

    Franck Guest

    Hi,
    got a problem with my javascript and I think it's more linked to my
    asp.net code than script. (the reason I post here)

    In an ascx control, I've got two controls, one textbox and one Telerik
    TreeView.

    When I try
    document.getElementById('<%= MyTextBox.ClientID %>').innerText= 'X';

    It works great.
    But,
    document.getElementById('<%= MyTreeView.ClientID %>') failed and return
    nothing !

    Any idea ?

    Thks for help.
     
    Franck, Aug 25, 2005
    #1
    1. Advertising

  2. Franck

    Franck Guest

    One point for you ! I'll check that
     
    Franck, Aug 25, 2005
    #2
    1. Advertising

  3. Franck

    Franck Guest

    And the winner is Eliyahu ! ^^
    Thks for you help.
     
    Franck, Aug 25, 2005
    #3
  4. You need to understand what html controls the TreeView is rendering like.
    Obviously, it is not one control, rather a set of several. View html source
    of the page, it will give you an idea.

    Eliyahu

    "Franck" <> wrote in message
    news:...
    > Hi,
    > got a problem with my javascript and I think it's more linked to my
    > asp.net code than script. (the reason I post here)
    >
    > In an ascx control, I've got two controls, one textbox and one Telerik
    > TreeView.
    >
    > When I try
    > document.getElementById('<%= MyTextBox.ClientID %>').innerText= 'X';
    >
    > It works great.
    > But,
    > document.getElementById('<%= MyTreeView.ClientID %>') failed and return
    > nothing !
    >
    > Any idea ?
    >
    > Thks for help.
    >
     
    Eliyahu Goldin, Aug 25, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank
    Replies:
    2
    Views:
    4,037
    Frank
    Jan 10, 2009
  2. wk
    Replies:
    5
    Views:
    201
    Dietmar Meier
    Apr 22, 2005
  3. Martin
    Replies:
    3
    Views:
    174
  4. Jake Barnes
    Replies:
    2
    Views:
    137
  5. Replies:
    4
    Views:
    187
    Jonas Raoni
    Nov 21, 2006
Loading...

Share This Page