0

I have a splitter containing left and right pane. On the left pane it display the navigation , when an item was clicked, the URL corresponding to that item will be loaded into the right pane. I have successfully do this but I notice that after three successful ajaxrequest, my splitter is undefined after the fourth clicked.

Here is my partial js: var onPanelItemSelect = function (e) {

    var windowPath;

    windowPath = $(e.item).attr('data-value');

    if (windowPath != '#') {
        // get a reference to the splitter
        var splitter = $("#splitter").data("kendoSplitter");
        // load content into the pane    
        splitter.ajaxRequest("#right_pane", windowPath);
    }

    return false;
}

Do I miss something?

Ice_Drop
  • 452
  • 1
  • 9
  • 19

1 Answers1

0

Are you sure the reason is that you load the partial view three times? The reason for that behavior might be what is actually loaded with these requests.

Famous problem is to load another jQuery with these ajax requests and thus all the widgets will be cleared from the memory and you will start to get the undefined problems.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Petur Subev
  • 19,983
  • 3
  • 52
  • 68
  • my fault. I have already fix the issue but the next problem is "myfunction is not defined" when my view was displayed on the splitter. Anyways thanks for the reply – Ice_Drop Jan 21 '13 at 05:23