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

TypeError: 'open' called on an object that does not implement interface Window

3 Answers 704 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ajinkya
Top achievements
Rank 1
Ajinkya asked on 14 Jun 2014, 09:08 AM
This is a kendo DropDownList. I want to show an alert when it is opened.

@(Html.Kendo()
.DropDownList()
.Name("DropdownList")
.BindTo(new List<SelectListItem>() { new SelectListItem() { Text = "Drop Down" },
 new SelectListItem() { Text = "Office" } })
.Events(e=>e.Open("open")))

// Following is the simple script
<script type="text/javascript">
function open(e) {
    alert("Hello");
}
</script>

This gives me the error "TypeError: 'open' called on an object that does not implement interface Window."

Thanks

3 Answers, 1 is accepted

Sort by
0
Ajinkya
Top achievements
Rank 1
answered on 14 Jun 2014, 10:14 AM
I am Getting the above described error in Mozilla 29.0.1

Whereas in Google Chrome I get the following error:
Uncaught TypeError: illegal Invocation

Errors in both the browsers point to 'kendo.all.min.js : line 9' . My kendo version is 2014.1.416
0
Petur Subev
Telerik team
answered on 18 Jun 2014, 06:46 AM
Hello Ajinkya,

I tried the code that you shared and it works without any issues on my side. Here is what I experience on my side:

http://screencast.com/t/LwNSlEcNqc2

Make sure that you are not struggling with some of the general troubles covered in our troubleshooting section.

Could you please create a small demo project which we can run and investigate the issue that you face? 

Kind Regards,
Petur Subev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ajinkya
Top achievements
Rank 1
answered on 18 Jun 2014, 08:06 AM
Hello Petur,
     
       Thank you for the reply. I referred to earlier posts on the forum and found the error.
        jQuery was included twice. Thus, resolved.
Tags
General Discussions
Asked by
Ajinkya
Top achievements
Rank 1
Answers by
Ajinkya
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or