RadCombobox get_text javascript throw exception due to this.get_inputDomElement() is null

11 posts, 0 answers
  1. Jeffery
    Jeffery avatar
    1 posts
    Member since:
    Sep 2012

    Posted 09 Jan 2013 Link to this post

    get_text:function(){if(this.get_simpleRendering()){return this._text;
    }else{return this.get_inputDomElement().value;
    }}
    Javascript Call stack:
    _onChangeHelper()
      get_text()

    Way to simulate:
    I had bind the postback function on Enter key (onkeypress), the error will occurred when I type few characters and press Enter key immediately.

    This is sample markup I using:
    <telerik:RadComboBox ID="cboSearchBox" runat="server" Height="88px" EnableLoadOnDemand="true"
                        MarkFirstMatch="false" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
                        AllowCustomText="true"  ShowDropDownOnTextboxClick="false"
                        OnItemsRequested="cboSearchText_ItemsRequested" ShowToggleImage="false" ItemsPerRequest="6"
                        MinFilterLength="3" 
                        OnClientItemsRequesting="SearchController.HandleSendRequest" CloseDropDownOnBlur="true"
                        Width="450px" AutoPostBack="false" OnClientSelectedIndexChanged="SearchController.HandleSelectedIndexChanged"
                        DropDownWidth="450px" HighlightTemplatedItems="true" Filter="None">
     <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" OnClick="btnSearch_Click" />
    <script type="text/javascript">
    var postbackFunction = "<%= this.Page.ClientScript.GetPostBackEventReference(this.btnSearch, null) %>";
    var SearchController = (function () {
    TriggerSearch: function () {
                var cb = $find("<%=cboSearchBox.ClientID %>");
                    eval(postbackFunction);
            }
    } ());
    function pageLoad() {
            $("#<%=cboSearchBox.ClientID %>_Input").keydown(function (event) {
                SearchController.SetSearchMessage('');
                if (event.which == 13) {
                    SearchController.TriggerSearch();
                }
            });
    </script>
    This error won't appear if using older version.
    Please kindly advise. Thanks :)
  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 11 Jan 2013 Link to this post

    Hello Jeffery,

    I noticed that you sent us a support ticket (Ticket ID : 647259), regarding the same topic. I can suggest you to continue our conversation in the support ticket, in order to have a consistent correspondence.

    Kind regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mike
    Mike avatar
    36 posts
    Member since:
    Sep 2012

    Posted 22 Jan 2013 Link to this post

    What is the resolution for this? We are experiencing the same issue w/ the latest Telerik release: 2012.3.1308.40, dated 1/7/2013.

    Thank you,

    Mike Oliver
  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 25 Jan 2013 Link to this post

    Hi Mike,

    The described issue was not replicated at our end. Could you specify the problem you are facing and the version of our controls that you use? In addition, could you provide us your implementation, in order to replicate the issue at our end?

    Kind regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Tim
    Tim avatar
    7 posts
    Member since:
    Jul 2012

    Posted 06 Mar 2013 Link to this post

    Same issue here, exact same cause as described by the original poster. Seems to be a timing issue somehow related with how fast one hits the enter key and how fast the webservice delivers the search result.
  7. Mike
    Mike avatar
    36 posts
    Member since:
    Sep 2012

    Posted 06 Mar 2013 Link to this post

    Yes - we found it to be a timing issue as well. I didn't follow up w/ a sample that demonstrates the issue because we decided to go with the previous Q4 '12 release instead - which was too bad....
  8. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 11 Mar 2013 Link to this post

    Hi,

    I am afraid that we are still unable to replicate the described exception. For that matter I would like to ask you to provide us with a runnable sample demonstrating the issue or a snippet of code with the declaration, in order to reproduce the issue at our side.

    Regards,
    Hristo Valyavicharski
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. Venkataramireddy
    Venkataramireddy avatar
    2 posts
    Member since:
    Jun 2013

    Posted 10 Jun 2013 Link to this post

    i am also facing same problem

    please check my code
    },get_text:function(){if(this.get_simpleRendering()){return this._text; }else{return this.get_inputDomElement().value;

    a.RadComboBox.prototype._addNewItems=function(m,r){this.set_selectedItem(null);
    this.set_highlightedItem(null); this._childControlsCreated=true; var h=this.get_items().get_count();

        <telerik:RadComboBox ID="RcmbPartsId" AppendDataBoundItems="false"  runat="server" 
     TabIndex="1" AllowCustomText="true"                                                                                             
    AutoPostBack="true" ToolTip="Part #" MarkFirstMatch="true" EmptyMessage="Please Select Part"
    OnSelectedIndexChanged="RcmbPartsId_SelectedIndexChanged" EnableLoadOnDemand="true"
    ShowMoreResultsBox="true" EnableVirtualScrolling="true" AccessibilityMode="true">
    <WebServiceSettings Method="GetPartsforSitepart" Path="../Services/AutoCompleteForAllModules.asmx" />                                                                                         
    </telerik:RadComboBox>

    please find resolution
  10. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 13 Jun 2013 Link to this post

    Hi Venkataramireddy,

    We are finding difficulties to isolate this behavior.  Please open a new support ticket and attach sample with steps to reproduce. Once we have it, we will debug your code and search for solution.

    Thanks.

    Regards,
    Hristo Valyavicharski
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  11. François-Xavier
    François-Xavier avatar
    1 posts
    Member since:
    Jun 2013

    Posted 26 Jun 2013 Link to this post

    Hi,

    like Venkataramireddy, we encounter a javascript error (maybe asynchronous load with webservice use in RadCombobox). I understand that you can't reproduce easily that error because it seems to be a random one. Here is a more complete javascript stack trace that may be help you to find a solution:
    Uncaught TypeError: Cannot call method 'get_count' of null Telerik.Web.UI.WebResource.axd:10514
    a.RadComboBox._addNewItems Telerik.Web.UI.WebResource.axd:10514
    a.RadComboBox._onWebServiceResponse Telerik.Web.UI.WebResource.axd:10509
    (anonymous function) Telerik.Web.UI.WebResource.axd:6
    (anonymous function) Telerik.Web.UI.WebResource.axd:6
    Telerik.Web.UI.WebServiceLoader._raiseEvent Telerik.Web.UI.WebResource.axd:966
    Telerik.Web.UI.WebServiceLoader._onWebServiceSuccess Telerik.Web.UI.WebResource.axd:961
    (anonymous function) Telerik.Web.UI.WebResource.axd:6
    l Telerik.Web.UI.WebResource.axd:6
    (anonymous function) Telerik.Web.UI.WebResource.axd:6
    Sys.Net.WebRequest.completed Telerik.Web.UI.WebResource.axd:6
    _onReadyStateChange

    good luck
  12. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 01 Jul 2013 Link to this post

    Hi François-Xavier,

    The provided stack trace doesn't provide much information.  Please refer to this article to see why we are requesting sample with additional details.

    Thanks.

    Regards,
    Hristo Valyavicharski
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017