Total Pageviews

Saturday, June 16, 2012

Adding portlets on page using JavaScript

This is gonna be a very small post, but trust me these two lines are amazing.
This code add portlet on the current page.

You just have to use it inside a javascript function, like:

All now neede is to envoke this function on click on a button with propert portletId, like:

and yes its done. Hope this will help.

No comments:

Post a Comment