jQWidgets Forums

jQuery UI Widgets Forums ASP .NET MVC jqxtab inside jqxwindow behaving strange

This topic contains 2 replies, has 2 voices, and was last updated by  RobWarning 7 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • jqxtab inside jqxwindow behaving strange #98659

    RobWarning
    Participant

    Hi,

    I have in a mvc application a jqx window with an jqx tab inside like this:

     $('#addComplaint').click(function () {
            $('#AddNewWindow').jqxWindow({
                theme: 'energyblue',
                title: 'Add new complaint',
                isModal: true,
                initContent: function () {
                    $('#tabs').jqxTabs({
                        theme: 'energyblue',
                        collapsible: true
                    });
                    $('#AddnewDiv').empty();
                    $('#AddnewDiv').load("/Home/GetView", { ViewName: "_AddEditComplaint", mode: "add" }, function () {
                        $('#ComplaintText').jqxEditor({
                            height: '200px',
                            width: '800px'
                        })
                    });
                }
            })
            $('#AddNewWindow').jqxWindow('open');
        })
    
    And this is the HTML:
    

    <div id=”AddNewWindow”> @*popup window for adding new complaints*@
    <div id=”title”>complaint </div>
    <div>
    <div id=”tabs”>

    • Main
    • Actions
    • Parts
    • Attachments

    <div id=”AddnewDiv”></div>
    <div> action tab </div>
    <div> parts tab </div>
    <div>attachments tab</div>
    </div>
    </div>
    </div>`

    So the content of the tab itself is static but the content of the first tab is dynamically loaded with the load function. (it loads a partial view with an form)
    It works fine but the strange thing is that when the content of the first (AddnewDiv) tab shows an I click again on that tab, the content is hiding.
    clicking the again an the content shows again. and so on! I can not explain why.

    jqxtab inside jqxwindow behaving strange #98683

    Peter Stoev
    Keymaster

    Hi RobWarning,

    I would like to suggest you to implement also the initTabContent in order to initialize the content inside the tabs.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

    jqxtab inside jqxwindow behaving strange #98699

    RobWarning
    Participant

    This is indeed solving the problem! thank you Peter.

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

You must be logged in to reply to this topic.