This is a migrated thread and some comments may be shown as answers.

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

10 Answers 246 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jeffery
Top achievements
Rank 1
Jeffery asked on 10 Jan 2013, 04:51 AM
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 :)

10 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 11 Jan 2013, 08:46 AM
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.
0
Mike
Top achievements
Rank 1
answered on 22 Jan 2013, 11:51 PM
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
0
Nencho
Telerik team
answered on 25 Jan 2013, 01:05 PM
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.
0
Tim
Top achievements
Rank 1
answered on 06 Mar 2013, 01:27 PM
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.
0
Mike
Top achievements
Rank 1
answered on 06 Mar 2013, 02:28 PM
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....
0
Hristo Valyavicharski
Telerik team
answered on 11 Mar 2013, 12:46 PM
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.
0
Venkataramireddy
Top achievements
Rank 1
answered on 10 Jun 2013, 01:22 PM
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
0
Hristo Valyavicharski
Telerik team
answered on 13 Jun 2013, 11:15 AM
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.
0
François-Xavier
Top achievements
Rank 1
answered on 26 Jun 2013, 09:34 AM
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
0
Hristo Valyavicharski
Telerik team
answered on 01 Jul 2013, 08:26 AM
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.
Tags
ComboBox
Asked by
Jeffery
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Mike
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Venkataramireddy
Top achievements
Rank 1
François-Xavier
Top achievements
Rank 1
Share this question
or