Full ClientID

3 posts, 0 answers
  1. benitolopez_sistemas
    benitolopez_sistemas avatar
    25 posts
    Member since:
    Jan 2007

    Posted 02 May 2010 Link to this post

    Is there way I can get the full ClientID description?

    I need to "focus" via javascript the webcontrols, but as you know if you have a radtextbox  the clientId "focusable" is endding with "_text", the raddateinput ends with "_dateInput_text", etc

    So I need to know if there is a function for retrieving on the serverside this information.

    Thanks.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 May 2010 Link to this post

    Hello,

    You could use the following client code in order to get the client side object of RadDateInput control.

             var input = $find('<%= RadDateInput1.ClientID %>');

    .

    .

    The following example shows how to get a reference to its DOM element:

             var inputElement = $get('<%=RadInput1.ClientID%>' + '_text');

    .

    .

    Checkout the documentation for more information about this: Client-Side Basics

    Additionally, Here is the code that I used for focussing the RadDateInput control from client side. I hope this could help.

     
    <script type="text/javascript">  
        function pageLoad() {  
            var input = $find('<%= RadDateInput1.ClientID %>');  
            input.focus();  
        }  
    </script> 

    -Shinu.

  3. benitolopez_sistemas
    benitolopez_sistemas avatar
    25 posts
    Member since:
    Jan 2007

    Posted 03 May 2010 Link to this post

    Thanks for reply.

    But If I have a lot of radwebcontrols or webcontrols in the page, and I need serverside generate the client javascript code, How can I know on ther serverside the full clientid of the webcontrol for passing it as a parameter, and send it back the javascript code to the browser ?

    In your example you refer just for one webcontrol, but I need a function to pass a full clientid as parameter for any webcontrol on the page.

    Thanks
Back to Top