Note that there are some explanatory texts on larger screens.

plurals
  1. POwindow.close() not working on pop up with pop up
    primarykey
    data
    text
    <p>I have a Customer Info form that has anchor tag "close" that should close the current window. This customer form is being opened as pop up. The Customer form also has a search btn that when clicked it pop ups the search form that is being run by a javascript called searchOrder.js. So basically it is a pop up inside a pop up. The customer form's close btn is not working but when the reference to searchOrder.js is removed, it begins to work. Also, when the search pop up is open and I click the "close" anchor tag, it closes the search pop up but never the current window which is the customer form. Ive tried a lot of solutions already but nothing is working. I used self.close(), window.opener.close(), made it a btn instead of a link etc.,c alled a function onclick</p> <pre><code> function closeWindow() { var closeRef; window.opener='x'; closeRef = window.open('','_parent',''); //or closeRef = window.open("",name); closeRef.close(); } </code></pre> <p>heres my gsp code:</p> <pre><code> &lt;g:form method="post" name="CustomerInfoForm" target="_parent" role="form"&gt; &lt;div class="id="closeLink"&gt;&lt;a href="JavaScript:window.close()"&gt;Close&lt;/a&gt;&lt;/div&gt; &lt;button id="searchOrderButton" type="button" class="button" onclick="searchOrder(document.forms[0].summaryMessage.value,'summaryMessageText','${createLink(action:'searchOrder')}','${createLinkTo(dir:'images',file:'closeButton.gif')}')" value="Search Order"&gt;Check Order&lt;/button&gt; &lt;/g:form&gt; </code></pre> <p>How do I make the current window (customer info ) close? tnx</p>
    singulars
    1. This table or related slice is empty.
    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.
    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