jQWidgets Forums

jQuery UI Widgets Forums Dialogs and Notifications Window Remove all html source

This topic contains 3 replies, has 2 voices, and was last updated by  Makla 11 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Remove all html source #18006

    Makla
    Participant

    I am loading jqxWindows from server via ajax. I try to placed them inside div:

    var div = $('<div id="window-container-' + name + '">');
    $("#" + Settings.WindowsContainer).append(div);
    var request = $.get(win.Url, function(data)
    {
    div.append(data);
    });
    return {Request: request};

    But only javascript is placed inside newly created div. Everything else (jqxWindow, jqx-menu-wraper, listbox) is appended to body.
    I am loading a lot of windows from server and at one point I want to remove html source for old windows.
    My idea was to delete the whole div element and everything that was loaded from server. That’s why I am trying to append it to div.
    I could remove windows myself, but there are also some jqx-menu-wrapper and listbox that appears as body childs. (Others: input, grid, button, checkbox are placed inside window div.)
    Can you correct this that all childs source is placed inside Window div.
    Or better correct that jqwidgets can be placed inside other html element than body.

    Remove all html source #18044

    Dimitar
    Participant

    Hello Makla,

    We recommend using the widgets’ destroy methods to remove their respective HTML from the DOM.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Remove all html source #20824

    Makla
    Participant

    Apparently Destroy removes any childs html from DOM, but not the Window itself. Is this correct?
    To do that I need to manually remove

    <div id="window1">

    from body, or there is another way?

    Remove all html source #20914

    Makla
    Participant

    I am sorry. My mistake. It does clear all sources.
    Works as expected. 🙂

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

You must be logged in to reply to this topic.