<?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>Display the content of an article in a modal pop-up</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=2465339" />
  <subtitle>Display the content of an article in a modal pop-up</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=2465339</id>
  <updated>2026-04-09T12:21:53Z</updated>
  <dc:date>2026-04-09T12:21:53Z</dc:date>
  <entry>
    <title>RE: Display the content of an article in a modal pop-up</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3380969" />
    <author>
      <name>Victor Zorin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3380969</id>
    <updated>2009-06-23T08:48:29Z</updated>
    <published>2009-06-23T08:48:29Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;The only way to make actions within portlet in a popup mode, stay in it  and render results is via AJAX calls. If you do not do AJAX, any other action will be changing current url and popup portlet will be closing because of this change.&lt;br&gt;&lt;br&gt;Have some reading about AJAX. Rough idea is: within your popup jsp have div container with known id, then when action is submitted, the result shall be rendered back into this div using jQuery.load() method.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
&amp;lt;form name="&amp;lt;portlet:namespace/&amp;gt;yourForm" action="your portlet action"&amp;gt;
// your form params

// your button
&amp;lt;input type="button" onclick="javascript:&amp;lt;portlet:namespace/&amp;gt;buttonClicked();return false;"&amp;gt;

&amp;lt;/form&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;
// this js call will submit action and result is going to be rendered within given &amp;lt;div&amp;gt;
function &amp;lt;portlet:namespace/&amp;gt;buttonClicked() {
	var inputs = jQuery("input, textarea, select", document.&amp;lt;portlet:namespace/&amp;gt;yourForm); 
	var url = document.&amp;lt;portlet:namespace/&amp;gt;yourForm.action +  "&amp;amp;" + inputs.serialize();
	jQuery('#&amp;lt;portlet:namespace/&amp;gt;content').load(url);         
}
&amp;lt;/script&amp;gt;

&amp;lt;div id="&amp;lt;portlet:namespace/&amp;gt;content"&amp;gt;
this is where the rendering result will have to go to
&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Victor Zorin</dc:creator>
    <dc:date>2009-06-23T08:48:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: Display the content of an article in a modal pop-up</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3380108" />
    <author>
      <name>rajesh manepalli banti</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3380108</id>
    <updated>2009-06-23T07:09:24Z</updated>
    <published>2009-06-23T07:09:24Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;hi victor,&lt;br&gt;&lt;br&gt; thanks a lot.&lt;br&gt;i am getting popup of portlet B from portlet A without header part of portlet B.    &lt;br&gt;i used  the following url in portlet A,&lt;br&gt;&lt;pre&gt;&lt;code&gt;
/widget/web/guest/registration/-/[b]Registration_WAR_Registration_INSTANCE_1gKG[/b]
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;but portletids, will be different in  different servers(development, production). &lt;br&gt;how to get portletid of B  from portlet A? and where i have to change my code?&lt;br&gt;there is no link between these 2 portlets, except clicking on hypelink from portelt A, portlet B have to be opened. &lt;br&gt;&lt;br&gt;pls suggest for this. &lt;br&gt;&lt;br&gt;thanks in advance.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>rajesh manepalli banti</dc:creator>
    <dc:date>2009-06-23T07:09:24Z</dc:date>
  </entry>
  <entry>
    <title>RE: Display the content of an article in a modal pop-up</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3188391" />
    <author>
      <name>Victor Zorin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3188391</id>
    <updated>2009-05-27T07:12:25Z</updated>
    <published>2009-05-27T07:12:25Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;JJ, popup screen content would depend on what is rendered at '/web/pcc/carrierselect'. Generally if it is not a portlet instance-based url, having EXCLUSIVE state would not help.&lt;br&gt;&lt;br&gt;You can try the following code:&lt;br&gt;- if you are in LFR 5.2+&lt;br&gt;- you know the friendly URL where your article portlet is located, eg. /web/guest/myarticle_url;&lt;br&gt;- you know portlet id of the article you would like to popup (you can fetch it by going to 'Configuration' and taking value of Portlet ID), eg. 56_INSTANCE_g7M1;&lt;br&gt;- the following code shall popup content of this portlet&lt;br&gt;&lt;pre&gt;&lt;code&gt;
&amp;lt;script type="text/javascript"&amp;gt;
function popupMe() { 
	var popup = Liferay.Popup({title: "My Article",modal:true,position:[150,150],width:500});
	jQuery(popup).load(
 		'/web/guest/myarticle_url/-/56_INSTANCE_g7M1', 
 		{ });
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;That's probably is not what you want, but provides some idea.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Victor Zorin</dc:creator>
    <dc:date>2009-05-27T07:12:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: Display the content of an article in a modal pop-up</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3182834" />
    <author>
      <name>JJ Johnson</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3182834</id>
    <updated>2009-05-26T16:16:15Z</updated>
    <published>2009-05-26T16:16:15Z</published>
    <summary type="html">Has a remedy to this situation been found? I&amp;#39;m running into the exact same situation. I&amp;#39;m using the javascript below in a piece of web content to open a modal window with the goal of showing only another piece of web content:&lt;br /&gt;&lt;br /&gt;	function newpopup() { &lt;br /&gt;		var popup = new Liferay.Popup( { &lt;br /&gt;			position:[150,150], &lt;br /&gt;			modal:true, &lt;br /&gt;			width:500, &lt;br /&gt;			height:300,&lt;br /&gt;		} );  &lt;br /&gt;		jQuery(popup).load(&amp;#39;/web/pcc/carrierselect&amp;#39;, { windowState: &amp;#39;LiferayWindowstate.EXCLUSIVE&amp;#39;});&lt;br /&gt;	} &lt;br /&gt;&lt;br /&gt;However, the site&amp;#39;s header and footer is rendered as well. What else needs to be done to only render the display of a piece of web content on another page?&lt;br /&gt;&lt;br /&gt;Many thanks!</summary>
    <dc:creator>JJ Johnson</dc:creator>
    <dc:date>2009-05-26T16:16:15Z</dc:date>
  </entry>
  <entry>
    <title>RE: Display the content of an article in a modal pop-up</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2485312" />
    <author>
      <name>Hesediel Jackson</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2485312</id>
    <updated>2009-03-13T13:21:54Z</updated>
    <published>2009-03-13T13:21:54Z</published>
    <summary type="html">Hi Victor,&lt;br /&gt;&lt;br /&gt;Thanks to all this informations, I see what i have to do in order to reach my purpose.&lt;br /&gt;&lt;br /&gt;Hesediel.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Edit :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Hi everyone,&lt;br /&gt;&lt;br /&gt;With all the documentations Victor gave to me, I came up with something but it still doesn&amp;#39;t work. My code is :&lt;br /&gt;&lt;br /&gt;function ShowPopUp() &lt;br /&gt;{ &lt;br /&gt;            var url = &amp;#39;/web/guest/article&amp;#39;; &lt;br /&gt;            var popup = Liferay.Popup({ title: &amp;#34;Glossaire&amp;#34;, modal: true, width:300 , height:400, scrollsbar:true}); &lt;br /&gt;            jQuery(popup).load(url, { windowState : &amp;#39;LiferayWindowstate.EXCLUSIVE&amp;#39;}); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Here I just want to display the content of  /web/guest/article in a modal popup. When I clicked on the link, I saw the modal popup. &lt;br /&gt;&lt;br /&gt;Its content was the content of /web/guest/article with the default liferay header, spite of windowState set to LiferayWindowstate.EXCLUSIVE. &lt;br /&gt;&lt;br /&gt;Firebug had one error (when the modal popup opened) :&lt;br /&gt;            Liferay._ajaxOld is not a function.&lt;br /&gt;&lt;br /&gt;But the modal popup was here. So i tried to close the modal popup and it worked. The second after, I tried to click on the default button to edit an article. Firebug had another error :&lt;br /&gt;            Liferay.Util is undefined.&lt;br /&gt;&lt;br /&gt;I had to refresh the page in order to be able to edit the article.&lt;br /&gt;&lt;br /&gt;Thanks in advance,&lt;br /&gt;&lt;br /&gt;Hesediel.</summary>
    <dc:creator>Hesediel Jackson</dc:creator>
    <dc:date>2009-03-13T13:21:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: Display the content of an article in a modal pop-up</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2475600" />
    <author>
      <name>Victor Zorin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2475600</id>
    <updated>2009-03-12T21:18:57Z</updated>
    <published>2009-03-12T21:18:57Z</published>
    <summary type="html">See if the following links ring the bell:&lt;br /&gt;- &lt;a href="https://www.liferay.com/web/guest/community/forums/-/message_boards/message/2216545"&gt;Liferay popup for v5.2.1&lt;/a&gt;&lt;br /&gt;- &lt;a href="https://www.liferay.com/web/guest/community/forums/-/message_boards/message/2307737"&gt;[Resloved] AjaxUtil is not defined javascript error in 5.2LR &lt;/a&gt;</summary>
    <dc:creator>Victor Zorin</dc:creator>
    <dc:date>2009-03-12T21:18:57Z</dc:date>
  </entry>
  <entry>
    <title>Display the content of an article in a modal pop-up</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2465338" />
    <author>
      <name>Hesediel Jackson</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2465338</id>
    <updated>2009-03-12T09:01:03Z</updated>
    <published>2009-03-12T09:01:03Z</published>
    <summary type="html">Hi everyone,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m trying, like the title of this post says, to display the content of my article in a modal pop-up. I notice a modal pop-up is used during the edition of an article, when the user wants to create a link between a word and, for example, an URL. &lt;br /&gt;&lt;br /&gt;I want to use the same modal pop-up in order to display the content of my article. But how can I do that ? I don&amp;#39;t know if I have to insert another parameter in the URL of my &amp;#34;page&amp;#34; containing my article or if I have to call a javascript function when I edit my article. If I have to call a javascript function, I don&amp;#39;t know which one and where i can find it. &lt;br /&gt;&lt;br /&gt;I saw in my research that Liferay have something called AjaxUtil.js but I can&amp;#39;t find it. I use a Liferay Portal Standard Edition 5.1.2.&lt;br /&gt;&lt;br /&gt;Thanks in advance,&lt;br /&gt;&lt;br /&gt;Hesediel.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Edit :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;After more researches, I found this : &lt;em&gt;http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Using+Pop-up+in+Liferay&lt;/em&gt; but I really don&amp;#39;t know how to implement this. For a window pop-up, I know we only have to put windowState on POP_UP. But in order to use a &amp;#34;floating div pop-up&amp;#34; it&amp;#39;s different : &lt;br /&gt;&lt;br /&gt; 1) We have to put windowState on Exlusive.&lt;br /&gt; 2) We have to put javascript ( ?? ) in the onclick when we create a HTML link ( ?? ).&lt;br /&gt;&lt;br /&gt;I tried to do this things but I didn&amp;#39;t reached my purpose. With the help of Firebug, I&amp;#39;ve tried to see how this thing is implemented on Liferay but I don&amp;#39;t find anything.</summary>
    <dc:creator>Hesediel Jackson</dc:creator>
    <dc:date>2009-03-12T09:01:03Z</dc:date>
  </entry>
</feed>
