<?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>How to remove close button from A.Modal</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=56141447" />
  <subtitle>How to remove close button from A.Modal</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=56141447</id>
  <updated>2026-10-15T12:00:20Z</updated>
  <dc:date>2026-10-15T12:00:20Z</dc:date>
  <entry>
    <title>RE: How to remove close button from A.Modal</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119685902" />
    <author>
      <name>Elbert Perez</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119685902</id>
    <updated>2020-08-01T08:06:48Z</updated>
    <published>2020-08-01T08:06:48Z</published>
    <summary type="html">Very helpful and informative. Thank for sharing this post.&lt;br /&gt;&lt;a href="https://www.walgreenslistens.mobi/"&gt;WalgreensListens&lt;/a&gt;</summary>
    <dc:creator>Elbert Perez</dc:creator>
    <dc:date>2020-08-01T08:06:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to remove close button from A.Modal</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119117732" />
    <author>
      <name>Manushi Jani</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119117732</id>
    <updated>2020-05-07T14:58:38Z</updated>
    <published>2020-05-07T14:58:38Z</published>
    <summary type="html">Works perfect Jonathan...Thanks</summary>
    <dc:creator>Manushi Jani</dc:creator>
    <dc:date>2020-05-07T14:58:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to remove close button from A.Modal</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56251374" />
    <author>
      <name>vas basfot</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56251374</id>
    <updated>2015-07-13T10:20:27Z</updated>
    <published>2015-07-13T10:20:27Z</published>
    <summary type="html">Perfect. Second example it&amp;#39;s exactly what I need. :-)&lt;br /&gt;&lt;br /&gt;Thanks a lot.</summary>
    <dc:creator>vas basfot</dc:creator>
    <dc:date>2015-07-13T10:20:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to remove close button from A.Modal</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56249482" />
    <author>
      <name>Vasimkhan Pathan</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56249482</id>
    <updated>2015-07-13T09:11:51Z</updated>
    <published>2015-07-13T09:11:51Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;&lt;br&gt;To remove "toolbar" you have to set toolbar attribute to "false". The toolbar DIV will not be generated.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;YUI().use(
  'aui-modal',
  function(Y) {
    var modal = new Y.Modal(
      {
        bodyContent: 'Modal body',
        centered: true,
        headerContent: '&amp;lt;h3&amp;gt;Modal header&amp;lt;/h3&amp;gt;',
        modal: true,
        render: '#modal',
	toolbars: false,
        width: 450
      }
    ).render();
  }
);&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;If you want to remove header and toolbar both without any junk DIV. Try below code :&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;YUI().use(
  'aui-modal',
  function(Y) {
    var modal = new Y.Modal(
      {
        bodyContent: 'Modal body',
        centered: true,
        modal: true,
        render: '#modal',
		toolbars: false,
        width: 450
      }
    ).render();
  }
);&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Thanks&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vasimkhan Pathan</dc:creator>
    <dc:date>2015-07-13T09:11:51Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to remove close button from A.Modal</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56244623" />
    <author>
      <name>vas basfot</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56244623</id>
    <updated>2015-07-13T07:23:04Z</updated>
    <published>2015-07-13T07:23:04Z</published>
    <summary type="html">Hi, super it works but ... still one small questions. &lt;br /&gt;&lt;br /&gt;I need to no headerContent so I remove this line headerContent: &amp;#39;&amp;lt;h3&amp;gt;Loading&amp;lt;/h3&amp;gt;&amp;#39;, , but in window stay white empty row --&amp;gt; how remove all this row?&lt;br /&gt;&lt;br /&gt;Thanks a lot.</summary>
    <dc:creator>vas basfot</dc:creator>
    <dc:date>2015-07-13T07:23:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to remove close button from A.Modal</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56138095" />
    <author>
      <name>Jonathan Mak</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56138095</id>
    <updated>2015-07-09T16:36:27Z</updated>
    <published>2015-07-09T16:36:27Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Vas,&lt;br&gt;&lt;br&gt;The AUI Modal has an attribute called "toolbars".  You can pass in whatever contents you want to certain toolbar sections.  If you are looking to remove the header close button, you can pass in a blank array to the header toolbar like below:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
YUI().use(
	'aui-modal',
	function(Y) {
		var modal = new Y.Modal(
			{
				bodyContent: 'Modal body',
				centered: true,
				headerContent: '&amp;lt;h3&amp;gt;Modal header&amp;lt;/h3&amp;gt;',
				modal: true,
				render: '#modal',
				toolbars: {
				    header: []
				}
				width: 450
			}
		).render();
	}
);
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;I hope this helps!  Please let me know if you have any questions.  Thanks!&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Jonathan Mak</dc:creator>
    <dc:date>2015-07-09T16:36:27Z</dc:date>
  </entry>
  <entry>
    <title>How to remove close button from A.Modal</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56141446" />
    <author>
      <name>vas basfot</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=56141446</id>
    <updated>2015-07-09T16:18:11Z</updated>
    <published>2015-07-09T16:18:11Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi, a need remove close button on top right place from A.Modal. Thanks a lot. Below is my code from basic examples which I use.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="yui3-skin-sam"&amp;gt;
  &amp;lt;div id="modal"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

YUI().use(
  'aui-modal',
  function(Y) {
    var modal = new Y.Modal(
      {
        bodyContent: 'Modal body',
        centered: true,
        headerContent: '&amp;lt;h3&amp;gt;Modal header&amp;lt;/h3&amp;gt;',
        modal: true,
        render: '#modal',
        width: 450
      }
    ).render();
  }
);&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>vas basfot</dc:creator>
    <dc:date>2015-07-09T16:18:11Z</dc:date>
  </entry>
</feed>
