Posted 09 Nov 2010 Link to this post
function
filterSearch()
{
var
combo = $find(
'<%=RadComboBox1.ClientID %>'
);
textbox = document.getElementById(
"txtSearch"
selectedItemsCount = combo.get_selectedItems().length;
if
(selectedItemsCount == 0)
alert(
"You must select a category before processing search!"
return
false
;
}
<
asp:Button
ID
=
"btnSearch"
runat
"server"
Style
"float: left; color: black; font-weight: bold"
Text
"Search"
OnClick
"btnSearch_Click"
OnClientClick
"javascript: return filterSearch();"
/>
(combo.get_selectedIndex() ==
null
)
Posted 03 May 2018 Link to this post
To resurrect old thread:
if (combo.get_selectedIndex() == null)
gives me an error in Firefox. I tried other solutions with no luck
Posted 08 May 2018 Link to this post
What is the error and its stack trace? I am attaching here a video of my test and this seems to work as expected. What am I missing from your setup and attempts? Can you paste here the combo box markup so I can see how you are using it?
Posted 08 May 2018 in reply to Marin Bratanov Link to this post
Hi Marin,
Embarrassingly, it works fine now, not sure what happened, likely my bad.
Sorry to resurrect the issue.
Thank you
David
--Marin