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

Problem with Window and KnockoutJS

0 Answers 116 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Luk
Top achievements
Rank 1
Luk asked on 13 Jan 2012, 12:59 PM
Hi,

I have following problem:

when I use simple button (or any other HTML element) on a page and bind click function to it using KO, there is no problem.
However, I have AJAX based naviagation on my site - skeleton of the website is loaded only once. Then on every click on the Kendo Menu I make request to fetch specified module and replace HTML content of certain <div> container.

The Problem:
When I use mentioned button in a Kendo Window, the click function is binded correctly and everything works fine. Then, when I navigate to a different website module through Menu and then return - actions after click on the button are binded twice (when I click the button, it calls it's function twice). If I switch a website module once again, it binds one more (function is called three times). And so on...

The Problem occurs on every item in a Window only. Outside the Window in specified module everything binds just once, as designed.

PS. When I remove the $("#userForm").kendoWindow(); code, everything works fine also, actions binds just once, as designed. 

No answers yet. Maybe you can help?

Tags
Integration with other JS libraries
Asked by
Luk
Top achievements
Rank 1
Share this question
or