jQuery UI Widgets Forums ASP .NET MVC InitContent reset

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  RobWarning 2 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • InitContent reset #98751

    RobWarning
    Participant

    Hi,

    Referring to my previous question regarding the Tab content.
    I use now the InitContent function to load the content of the jqxwindow and later for the jqxTab. The content is dynamically loaded with an ajax call. It loads an item to be edited. If I close my jqxwindow and select an new item to be edited the old data is still present. I think because the InitContent function triggers only once and the content remains even after the window is closed. How to work around this?
    this is my script:

    function CreateAddEditWindow() {
    $(‘#AddNewWindow’).jqxWindow({
    theme: ‘energyblue’,
    title: ‘Add new complaint’,
    isModal: true,
    initContent: function () {
    $(‘#tabs’).jqxTabs({
    theme: ‘energyblue’,
    initTabContent: function (tab) {
    $(‘#AddnewDiv’).empty();
    $(‘#AddnewDiv’).load(“/Home/GetView”, { ViewName: “_AddEditComplaint”, mode: mode, Id }, function () {
    $(‘#ComplaintText’).jqxEditor({
    height: ‘200px’,
    width: ‘800px’
    })
    });
    }
    });
    }
    })
    $(‘#AddNewWindow’).jqxWindow(‘open’);
    };

    InitContent reset #98753

    RobWarning
    Participant

    Ok this was a rather stupid question. I should simply use the open event to load the dynamic content.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.