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

Error:While clicking on radcombox

4 Answers 52 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 08 Nov 2011, 01:31 PM
Hi,

I am getting following javascript error while clicking on combo box

 'top' is null or not an object
but with up and down arrows i am able to change the items in combo box
I am declared combo as follows:and this combo is in popup window
<telerik:RadComboBox ID="rad1" runat="server">
   <Items>
     <
telerik:RadComboBoxItem Text="1" Value="1" />
<telerik:RadComboBoxItem Text="2" Value="2" />
<telerik:RadComboBoxItem Text="3" Value="3" />
<telerik:RadComboBoxItem Text="4" Value="4" />
<telerik:RadComboBoxItem Text="5" Value="5" />
<telerik:RadComboBoxItem Text="6" Value="6" />
<telerik:RadComboBoxItem Text="7" Value="7" />
<telerik:RadComboBoxItem Text="8" Value="8" />
<telerik:RadComboBoxItem Text="9" Value="9" />
</Items>
   </telerik:RadComboBox>

can any one help in solving the issue?

Thanks,

4 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 08 Nov 2011, 02:30 PM
Hello Ram,

It seems that due to the javascript error that you encounter you are not able to expand and consequently select an item from the RadComboBox control. Can you please provide more details on your scenario since the code that you have pasted it not enough for us to reproduce the issue? For example it could be the definition of the javascript function that you use and how you call it? 

Regards,
Kate
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
Wesley
Top achievements
Rank 1
answered on 25 Feb 2014, 08:34 PM
Hi Kate, 

Any update on this? I have exact same issue as Ram has. 
We just update ASP.NET AJAX to 2013.3.1324.40 the latest version. But when click the combobox on IE8, the Jscript run time error is thrown:

Microsoft JScript runtime error: 'top' is null or not an object

if(this._getHeaderElement()){c+=this._getHeaderElement().offsetHeight;
}if(this._getFooterElement()){c+=this._getFooterElement().offsetHeight;
}if(this.get_moreResultsBoxElement()){c+=this.get_moreResultsBoxElement().offsetHeight;
}return c;
};
b.RadComboBox.prototype._calculateItemsHeight=function(){var d=0;
var e=this.get_items().get_count();
for(var c=0;
c<e;
c++){d+=this.get_items().getItem(c).get_element().offsetHeight;
}return d;
};
b.RadComboBox.prototype._getOffsetParentOffset=function(c){var h=0;
var f=0;
var d=a(c.offsetParent);
if(d.css("position")!="static"){var g=d.offset();
h=g.top; <<<<<<<<<---------------------------------------------------------------------------------------------------------------------------

Hope to hear from you soon. Thanks.

Wesley Fang
0
Kate
Telerik team
answered on 04 Mar 2014, 12:00 PM
Hi Wesley,

Can you clarify what is the version of the Telerik controls that you are upgrading from so I can get a better understanding of your particular scenario? I tested the code provided by Ram and everything seems to be working as expected from my side. Can you let me know if you use the same markup code and if there are any differences? 

Regards,
Kate
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Wesley
Top achievements
Rank 1
answered on 04 Mar 2014, 04:17 PM
Hi Kate,

Thank you for the reply at first.
It turns out that my website page structure has layout issue. After I create a master page including all header and footer, it works well with Telerik control now. 

Regards,

Wesley Fang
Tags
ComboBox
Asked by
Ram
Top achievements
Rank 1
Answers by
Kate
Telerik team
Wesley
Top achievements
Rank 1
Share this question
or