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

Microsoft JScript runtime error

0 Answers 31 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam
Top achievements
Rank 1
Sam asked on 02 Oct 2012, 09:54 PM
Hi,

I need help to solve my problem,  I have the following code:

@(Html.Telerik().ComboBox()

.Name(

 

"cmb")

 

.Placeholder(

 

"Select a record....")

 

.BindTo((

 

IEnumerable<DropDownItem>)ViewData["test"])

 

.HtmlAttributes(

 

new { style = "width:400px; white-space:nowrap;font-size: 17px;font-weight:bolder;" })

 

.ClientEvents(events => events

.OnChange(

 

"cmb_Onchange"))

 

)

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

 

function cmb_Onchange(){

 

alert(

 

'hi');

 

}

 

</

 

 

script>

 

I don't understand why I received this error:
Microsoft JScript runtime error: 'cmb_Onchange' is undefined

I have the following code im my Layout.cshtml - in the header:

 

 

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

 

 

 

<script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>

 

 

 

<script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>

 

 

 

<script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>

 

 

@(Html.Telerik().StyleSheetRegistrar()

.DefaultGroup(group => group.Add(

 

"telerik.common.css")

 

.Add(

 

"telerik.default.css")))

 

 

what else do I need?  Thanks for your help!


Tags
ComboBox
Asked by
Sam
Top achievements
Rank 1
Share this question
or