Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
amani kh
using javascript in web content display portlet
November 20, 2012 10:03 AM
Answer

amani kh

Rank: Junior Member

Posts: 43

Join Date: November 16, 2012

Recent Posts

hello, is it possible to include javascript code in web content display portlet (not web content template)?
Anil Sunkari
RE: using javascript in web content display portlet
November 20, 2012 8:56 PM
Answer

Anil Sunkari

Rank: Expert

Posts: 412

Join Date: August 11, 2009

Recent Posts

You mean you want to Customize/Extend Web Content Display Portlet? Then also its possible.
amani kh
RE: using javascript in web content display portlet
November 20, 2012 9:42 PM
Answer

amani kh

Rank: Junior Member

Posts: 43

Join Date: November 16, 2012

Recent Posts

actualy I want to use a jQuery with a web contnet display portlet, is it possible?
Anil Sunkari
RE: using javascript in web content display portlet
November 21, 2012 12:23 AM
Answer

Anil Sunkari

Rank: Expert

Posts: 412

Join Date: August 11, 2009

Recent Posts

Yes its possible.Only thing is how you handle the way you were expecting matters on your requirement base.
amani kh
RE: using javascript in web content display portlet
November 21, 2012 9:58 PM
Answer

amani kh

Rank: Junior Member

Posts: 43

Join Date: November 16, 2012

Recent Posts

thank you Anil Sunkari, plz can you tell me the steps how to do this?
Anil Sunkari
RE: using javascript in web content display portlet
November 22, 2012 12:09 AM
Answer

Anil Sunkari

Rank: Expert

Posts: 412

Join Date: August 11, 2009

Recent Posts

Refer Below URL:

http://www.liferay.com/zh/web/nathan.cavanaugh/blog/-/blogs/5363997

Hope it surely meets your requirement and still need any assitance.Welcome.

Regards,
Anil Sunkari
amani kh
RE: using javascript in web content display portlet
November 22, 2012 12:19 AM
Answer

amani kh

Rank: Junior Member

Posts: 43

Join Date: November 16, 2012

Recent Posts

hi, thank you one more time Anil Sunkari
I tried this, it dosnt work with a "web content display portlet", actulay I have only HTML code in my web content display portlet (I am using it to put some content in my page) and I wanna use a jQuery plugin with it (popup jQuery) but I dont know how to integrate them together!
I hope this clarifies the issue to you.thanks
Anil Sunkari
RE: using javascript in web content display portlet
November 22, 2012 9:23 PM
Answer

Anil Sunkari

Rank: Expert

Posts: 412

Join Date: August 11, 2009

Recent Posts

If i'm correct you are working out to display someting in Pop-Up whcih you have to achieve it with JQuery.
Jquery itself has so many user friendly methods to make it as simple as possible. For Example. I have a div

<div id="xxx">
Here My COntent Goes.........
</div>

JQuery("#xxxx").popup{}

I'm not sure about tyour Jquery Knowledge Existance. ... you will geta lot.

Correct me if i'm wrong with your understanding

Regards,
Anil Sunkari
amani kh
RE: using javascript in web content display portlet
November 23, 2012 9:16 PM
Answer

amani kh

Rank: Junior Member

Posts: 43

Join Date: November 16, 2012

Recent Posts

hi Anil Sunkari, my pb is not with the jQuery, all the pb is that I dont know how to integrate jQuery (javascript files) with the web content display portlet, is there a way??
thank you.
Ramesh Mandri
RE: using javascript in web content display portlet
November 24, 2012 12:05 AM
Answer

Ramesh Mandri

Rank: New Member

Posts: 8

Join Date: May 23, 2011

Recent Posts

Dear amani,

You can keep your java script code at manage page --> java script
Attachment

Attachments: javascript.png (20.0k)
Dan Cotton
RE: using javascript in web content display portlet
August 19, 2013 11:05 AM
Answer

Dan Cotton

Rank: New Member

Posts: 11

Join Date: November 21, 2007

Recent Posts

I have tried using the "javascript" section noted i the image above but once I save it the page is escaping the JS I entered with the [CDATA...] and the script does not load or run.

Suggestions?