First I'll post the code.
Here's the javascript code:
What this is supposed to do is that when an element is selected run the javascript and go to that page. It works for a few times and then my browser errors with this 'SCRIPT445: Object doesn't support this action' and highlights this line: var a=g?new h(g):new h. At first I thought that the function was not mapping to the combobox and setting the onclientselectedindexchanged on the server side and that did nothing. I tried setting the autopostback to true and tried it from serverside but I instantly got the same error after one selection. Then I thought that it's not grabbing the value from the box, but from the alert it looked like it was working. The only thing left was the windows.location so I commented that out and I don't receive that error anymore. Something is happening with the redirections that is causing this and I have no idea what it could be. I dont know if this helps but we are using custom skins for this combobox.
Here's the javascript code:
function sortByStatus() {// var item = eventArgs.get_item(); // var strSort = item.get_value(); var combo = $find("<%= rcbStatus.ClientID %>"); var comboItem = combo.get_selectedItem(); var strSort = comboItem.get_value(); alert('Selected ' + comboItem.get_value()); if (strSort != 'Active') { window.location = 'meet-the-panel.aspx?paneltype=' + strSort; } else { window.location = 'meet-the-panel.aspx'; } }<telerik:RadComboBox ID="rcbStatus" runat="server" Skin="Black" EnableEmbeddedSkins="false" Width="220px" > <Items> <telerik:RadComboBoxItem Value="Active" Text="Current Panelists"/> <telerik:RadComboBoxItem Value="alumni" Text="Past Panelists"/> </Items></telerik:RadComboBox>What this is supposed to do is that when an element is selected run the javascript and go to that page. It works for a few times and then my browser errors with this 'SCRIPT445: Object doesn't support this action' and highlights this line: var a=g?new h(g):new h. At first I thought that the function was not mapping to the combobox and setting the onclientselectedindexchanged on the server side and that did nothing. I tried setting the autopostback to true and tried it from serverside but I instantly got the same error after one selection. Then I thought that it's not grabbing the value from the box, but from the alert it looked like it was working. The only thing left was the windows.location so I commented that out and I don't receive that error anymore. Something is happening with the redirections that is causing this and I have no idea what it could be. I dont know if this helps but we are using custom skins for this combobox.