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

Combobox disappears on inline javascript

1 Answer 105 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Dharmesh
Top achievements
Rank 1
Dharmesh asked on 05 Oct 2011, 11:55 AM
Hello,

I have the below code and my combobox is getting disappeared on inline javascript call, but the aspx button has no any issue.

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

 

 

<div>

 

 

<telerik:RadComboBox ID="ddlReportUserViews" runat="server" AutoPostBack="true" AllowCustomText="false"

 

 

AccessibilityMode="true" Skin="Outlook">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Text="1" Value="1" />

 

 

<telerik:RadComboBoxItem Text="2" Value="2" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

<asp:Button ID="btn1" runat="server" Text="Click" OnClientClick="alert('hi');" />

 

 

 

<script type="text/javascript" language="javascript">

 

alert(

'hi');

 

 

</script>

 

 

</div>

 

 

</form>

 

</

 

body>

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 05 Oct 2011, 01:50 PM
Hello Dharmesh,

When the RadComboBox disappears, is it after the button's postback? I can understand why it would appear hidden, as the control is created using jQuery and the alert you call during the page load, stops all javascript calls, so the RadComboBox will only appear after you click ok.

I hope that explains why it disappears in your situation.
Tags
ComboBox
Asked by
Dharmesh
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Share this question
or