RadComboBox for ASP.NET

JavaScript errors - RadComboBox is undefined Send comments on this topic.
TroubleShooting > JavaScript errors - RadComboBox is undefined

Glossary Item Box

Symptoms

RadComboBox is undefined

Causes and Solutions

Telerik RadComboBox cannot find its java script file. The necessary file is fetched either from the WebResource.axd file or from the RadControls folder, depending on the control's settings.

Case 1: UseEmbeddedScripts property of Telerik RadComboBox is set to false

In this case Telerik RadComboBox will search for its java script file in the RadControls folder:

java script file in RadControls folder

The following script will be part of the rendered output of the combobox:

  Copy Code
<div id="RadComboBox1_wrapper" style="display:inline">
   
<!-- 2.6.2 --><script type="text/javascript" src="/WebSite5/RadControls/ComboBox/Scripts/2_6_2/RadComboBox.js"></script>

If the file is not physically in the location specified by the src property, or there is a version mismatch, or the file is unaccessible, you will experience 'RadComboBox' is undefined error.  To make sure that this is really the case, you can copy the path to the RadComboBox.js file in the browser and see if you have access to this file. If you cannot retrieve this file you will see the following error message:

The solution is to make sure that the file is intact, its version matches that of the DLL of the control, and it is in the location specified by the src property. If the file is accessible you will be able to view it or download it:

 

Case 2: UseEmbeddedScripts property of Telerik RadComboBox is set to true (Default case)

In this case Telerik RadComboBox will search for its java script file embedded in the WebResource.axd as part of the DLL of the control.

The following script will be part of the rendered output of the combobox:

  Copy Code
<div id="RadComboBox1_wrapper" style="display:inline">
<!-- 2.6.2 --><script type="text/javascript"
                             
src="/WebSite5/WebResource.axd?d=KQYtxU6s-a9BJuk-
                                  
Dg7vCuBxeGRTXgxmQSkjYXB3jkyzsU-HveE_YMAEPp1ibOdBn7hY
                                  I6qWrbGWm0MOVk4D6AeEHOd2MT09IrZIAw9vY9mVJAhNuwqgSNN5
                                  S9t-s4xv0
&t=633083453440000000">
                     
</script>

If you try to view the file from the location specified by the src property, but it is not accessible, you will get the following error:


EnlargeClick to enlarge

The following articles discuss possible causes and solutions of the problem: