Difference between revisions of "MyPortal Development guide"
m |
m |
||
Line 27: | Line 27: | ||
*''onmouseover'': called when mouse is over the element | *''onmouseover'': called when mouse is over the element | ||
*''onmouseout'': called when mouse is out of the element | *''onmouseout'': called when mouse is out of the element | ||
− | *''set_title(titleText)'': change the title of element | + | *''set_title(titleText)'': change the title of element |
+ | *''get_contentDiv()'': get the element's "div" content, used for manipulating the HTML content | ||
=== Sample code === | === Sample code === |
Revision as of 02:39, 2 January 2009
Contents
Introduction
The My Portal page is your own personalized view of what goes on in the Catglobe system that is interesting to you.
For more information, visit helpfiles at vietnamhelpfiles.catglobe.com/ under Persionalization/MyPortal.
How to make user defined elements
A user defined element as its name is the one you can put anything you want.
An element contains 2 features:
- HTML content: input inside Detailed decsription tab's HTML editor. It is required to show the element in MyPortal page (empty content will end up in not displaying anything)
- Javascript: input inside Detailed description tab's script mode. It is used to manipulate the way the element will act, it can connect to registered web services or change the HTML content dynamically. jQuery is also supported, which makes it even more powerful.
Script - Supported features
Events
- onload: called when element finished loading
- onadd: called when it is added to MyPortal for the first time (by Insert dialog)
- onminimize: called when minimizing the element
- onmaximize: called when maximizing the element
- onremove: called when the element is removed from MyPortal page
- onmouseover: called when mouse is over the element
- onmouseout: called when mouse is out of the element
- set_title(titleText): change the title of element
- get_contentDiv(): get the element's "div" content, used for manipulating the HTML content
Sample code
1 this.onload = function()
2 {
3 // use "this" keyword to access the element itself.
4 }
Potential problems
It can sometimes be quite problematic when displaying portal elements. It has to be careful when writing the HTML or script for portal element, no validation is supported with the editors.
Tips
- Flash objects might be placed on top of thers. In order to fix that problem, these parameters should be added into the flash:
IE: "<param name='wmode' value='transparent' />"
FF: 'wmode="transparent" '
Examples
Call a webservice:
Play a movie clip using CGFlashPlayer: