Clientside functions don´t work

9 posts, 0 answers
  1. Elmar
    Elmar avatar
    66 posts
    Member since:
    Apr 2007

    Posted 02 Jan 2008 Link to this post

    Hi there.

    I have some issues with clientside scripting of the combobox. All the getters and setters don´t work.

    Definition:
    var combo_route = $get('<%= DropDown_Routes.ClientID %>');
    combo_route.set_text(title);

    Produces an "is not a function error" (it is not undefined! "ctl00_navisub_DropDown_Routes"). Am I missing something here?

    Best regards,
    Elamr
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 03 Jan 2008 Link to this post

    Hello Elmar,

    I suggest that you try to get the instance of RadComboBox, like:
    var combo_route = $find('<%= DropDown_Routes.ClientID %>');

    Hope this helps.

    Regards,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Elmar
    Elmar avatar
    66 posts
    Member since:
    Apr 2007

    Posted 03 Jan 2008 Link to this post

    Unfortunately that does not work either.
    I think this behavior might be because I am accessing this thing from an external script that is loaded via "script src".

    So what I am doing in the page itself is, is to look for the clientid of that control:
    var dropdown_routes = $get('<%= DropDown_Routes.ClientID %>');

    That works just fine but I can´t access all the telerik custom clientside methods from the external script although the variable itself is declared and filled.

    How do I integrate the clientside functions in external scripts? My guess is that this is what 90% of developers use frequently.


  5. Jeff
    Jeff avatar
    33 posts
    Member since:
    Sep 2006

    Posted 07 Jan 2008 Link to this post

    Do you have this in a user control, ascx file? I fought this for days, and some of the items in the help are not the correct syntax either. I am posting a couple of examples below that I hope will help.

    Jeff

    function

    OnClientSelectedIndexChangingDDL(sender, eventArgs)
    {
    var combo = sender;
    var name = combo.get_id();
    alert(name);
    ....

    ......
    clearddl("Usercontrol1_RadComboBox1");
    .......

    function

    clearddl(objSelect)
    {
    var combo = $find(objSelect);
    combo.get_items().clear();
    combo.set_text(
    "");
    }

    function

    OnClientItemsRequestingDDLFascia(sender, eventArgs)
    {
    var context = eventArgs.get_context();
    context[
    "RuleSet"] = "DDLFascia";
    context[
    "param1"] = document.getElementById("Usercontrol1_RadComboBox1_Input").value;
    }

  6. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 07 Jan 2008 Link to this post


    Hi Elmar,

    Please find attached a project illustrating how to achieve your goal. Click the button in the Default.aspx page and test it. If this does not help you, please open a ticket and send us a project illustrating the problem to test it locally.

    Regards,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Elmar
    Elmar avatar
    66 posts
    Member since:
    Apr 2007

    Posted 07 Jan 2008 Link to this post

    Hi there. I actually ended up removing the component because it was too unstable for production use. The async data retrieval worked most of the time but sometimes it would fire an async error. Although this error can be caught and suppressed, it is not a good thing to have unpredictable errors in my app.

    Thanks for providing this support anyway!
  8. Awais
    Awais avatar
    5 posts
    Member since:
    Mar 2009

    Posted 18 Mar 2009 Link to this post

    I am unable to find the selected Index of RadcomboBox ... I am using it on USerControl ... can any one help me out... Thanks
  9. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 18 Mar 2009 Link to this post

    Hello Awais,

    Please give us some more details on your implementation.

    All the best,
    Veselin Vasilev
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Awais
    Awais avatar
    5 posts
    Member since:
    Mar 2009

    Posted 18 Mar 2009 Link to this post

    Actually I need to find the Selected Index on Bottom of the Page (UserControl). so i can take Decission based on that SelecetdIndex..

    The Problem is this , when i Attached a function in OnclienSelectedIndexChanged Prperty.. It Works Fine.. But If i used to find it outside the function , it gives me error ...

    Thanks
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017