Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery UI Dialog Issue: Close removes the div
    primarykey
    data
    text
    <p>I want to show a popup screen on my page using JQuery UI Dialog widget.</p> <p>To implement this I have a <code>&lt;div class="popup-placeholder"&gt;</code> on my page. Actually there are more than one on the page (If this makes a difference to the solution)</p> <p>On click of a button, I am initializing the dialog and 'open'ing it. The initialization of the popup is inside the action click because it is supposed to make an Ajax call to get the content of the popup. (I tried taking the initialization out of the click event, but that did not work <code>$('div.popup-placeholder').dialog();</code> )</p> <pre><code> var popupContext = $('#' + contextControl.id + ' &gt; .popup-placeholder'); popupContext.html(formHtml); $(popupContext).dialog({ bgiframe: true, modal: true, autoOpen: false, closeOnEscape: false, dialogClass: '', draggable: true, position: 'center', resizable: false, width: 600 }); </code></pre> <p>On click of the action button, the form shows and does what it is supposed to. Now, I have a close link on the popup WHICH IS NOT A DIALOG BUTTON, but just another link with an event binded to it. It does this...</p> <pre><code>$('#popup-placeholder-61').dialog('close'); </code></pre> <p>where #popup-placeholder-61 is the same as $(popupContext)</p> <p>The problem I am facing now is that, on close of the popup, the same action button does not show the popup again. The issues seems to be that the <code>&lt;div class="popup-placeholder"&gt;</code> has been removed from the mark-up.</p> <p>I tried the solutions on the following page but did not help - <a href="https://stackoverflow.com/questions/366854/jquery-ui-dialog-box-close-function">Jquery Dialog Close on StackOverflow</a></p> <p>So, I need more help</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload