<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Javascript at the close of a dialog box</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=23475604" />
  <subtitle>Javascript at the close of a dialog box</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=23475604</id>
  <updated>2026-06-14T10:07:40Z</updated>
  <dc:date>2026-06-14T10:07:40Z</dc:date>
  <entry>
    <title>RE: Javascript at the close of a dialog box</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23506460" />
    <author>
      <name>Victor Zorin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23506460</id>
    <updated>2013-04-10T10:54:53Z</updated>
    <published>2013-04-10T10:54:53Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;If you use AUI, no jquery is required, would be too much...&lt;br&gt;&lt;br&gt;See code below:&lt;br&gt;&lt;pre&gt;&lt;code&gt;  AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
    var dialog = new A.Dialog({
    	on: {
    		close: function() {
 	   		 window.alert('before close');
 	   		}
    	},		    		
 	            title: myTitle,
            centered: false,
            draggable: true,
            modal: true
        }).plug(A.Plugin.IO, {uri: renderUrl}).render();
       
        dialog.show();
       
  });
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Victor Zorin</dc:creator>
    <dc:date>2013-04-10T10:54:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: Javascript at the close of a dialog box</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23505081" />
    <author>
      <name>Chirag Patadia</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23505081</id>
    <updated>2013-04-10T10:18:19Z</updated>
    <published>2013-04-10T10:18:19Z</published>
    <summary type="html">Hi David,&lt;br /&gt;&lt;br /&gt;You can try with following 2 options:&lt;br /&gt;&lt;br /&gt;Option-1:&lt;br /&gt;$(&amp;#39;#dialog&amp;#39;).live(&amp;#34;dialogclose&amp;#34;, function(){&lt;br /&gt;   //code to run on dialog close&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;Option-2:&lt;br /&gt;There is on property available in AUI Diaplog named &amp;#34;beforeClose&amp;#34;.&lt;br /&gt;&lt;br /&gt;$(&amp;#34;#dialog&amp;#34;).dialog({&lt;br /&gt;...&lt;br /&gt;            beforeClose: function(event, ui) { &lt;br /&gt;               console.log(&amp;#39;Event Fire&amp;#39;);&lt;br /&gt;            },&lt;br /&gt;...&lt;br /&gt;});</summary>
    <dc:creator>Chirag Patadia</dc:creator>
    <dc:date>2013-04-10T10:18:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Javascript at the close of a dialog box</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23504124" />
    <author>
      <name>Mayur Patel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23504124</id>
    <updated>2013-04-10T09:59:31Z</updated>
    <published>2013-04-10T09:59:31Z</published>
    <summary type="html">Rightly said ! Using jquery you can fetch close button id and As roshan mentioned, you can define ur logic inside that function &lt;img alt="emoticon" src="@theme_images_path@/emoticons/cool.gif" &gt;</summary>
    <dc:creator>Mayur Patel</dc:creator>
    <dc:date>2013-04-10T09:59:31Z</dc:date>
  </entry>
  <entry>
    <title>RE: Javascript at the close of a dialog box</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23503583" />
    <author>
      <name>Roshan Qureshi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23503583</id>
    <updated>2013-04-10T09:27:37Z</updated>
    <published>2013-04-10T09:27:37Z</published>
    <summary type="html">Hi David,&lt;br /&gt;&lt;br /&gt;Not master in AUI but hope following code will work for you.&lt;br /&gt;Each dialog has closethick id for close button.&lt;br /&gt;A.one(&amp;#39;#closethick&amp;#39;).on(click,function(){})&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Roshan</summary>
    <dc:creator>Roshan Qureshi</dc:creator>
    <dc:date>2013-04-10T09:27:37Z</dc:date>
  </entry>
  <entry>
    <title>Javascript at the close of a dialog box</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23475603" />
    <author>
      <name>David B</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23475603</id>
    <updated>2013-04-09T13:48:28Z</updated>
    <published>2013-04-09T13:48:28Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hello,&lt;br&gt;&lt;br&gt;I acutallly use a dialog box and I want to execute some javascript at the close of the dialog.&lt;br&gt;&lt;br&gt;To display the dialog box, I use that function&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;function showPopup(url,titre) {
  
	AUI().use( 'aui-dialog', 'event', 'event-custom', function(A) {
	    
    	dialog = new A.Dialog({
			id: 'customDialog',
            title: titre,
            centered: true,
            draggable: false,
			resizable: false,
            modal: true,
            height:250,
            width:650

       	 }).plug(A.Plugin.IO, {uri: url}).render();
   		
       	 dialog.show();	 
  	});
}[code]

 If someone knows how I can  proceed.&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>David B</dc:creator>
    <dc:date>2013-04-09T13:48:28Z</dc:date>
  </entry>
</feed>
