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.

2 comments:

  1. Please can you post those two lines as it missed

    ReplyDelete
  2. JavaScript having a Browser support. To access flash content you need to install flash plug-in in your browser. But to use JavaScript, you don't have to use any plug-ins at all.
    learn web design

    ReplyDelete