Sinisakrisan (Talk | contribs) (Created page with "Any profile application can open and use JomSocial popup window. There is 3 simple JavaScript function that you can use. <syntaxhighlight lang="php"> function cWindowShow(wind...") |
|||
Line 1: | Line 1: | ||
− | Any profile application can open and use JomSocial popup window. There | + | Any profile application can open and use a JomSocial popup window. There are three (3) simple JavaScript functions that you can use. |
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
function cWindowShow(windowCall, winTitle, winWidth, winHeight); | function cWindowShow(windowCall, winTitle, winWidth, winHeight); | ||
Line 6: | Line 6: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<br /> | <br /> | ||
− | cWindowShow does not know how to fill up the window. | + | cWindowShow does not know how to fill up the window. You must pass a function to it, '''windowCall''', which cWindow will simply execute. In most cases, windowCall would simply be an Ajax call, which in turn, will try to fill '''cWindowContent''' id with HTML data. |
− | ===Opening a | + | ===Opening a Popup Window=== |
− | Example | + | '''Example''' |
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
var ajaxCall = 'jax.call("community", "plugins,walls,ajaxSaveWall")'; | var ajaxCall = 'jax.call("community", "plugins,walls,ajaxSaveWall")'; | ||
cWindowShow(ajaxCall, 'Compose', 450, 300); | cWindowShow(ajaxCall, 'Compose', 450, 300); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | <br /> | + | <br/> |
Latest revision as of 01:40, 8 March 2013
Any profile application can open and use a JomSocial popup window. There are three (3) simple JavaScript functions that you can use.
function cWindowShow(windowCall, winTitle, winWidth, winHeight); function cWindowActions(action); function cWindowHide();
cWindowShow does not know how to fill up the window. You must pass a function to it, windowCall, which cWindow will simply execute. In most cases, windowCall would simply be an Ajax call, which in turn, will try to fill cWindowContent id with HTML data.
Opening a Popup Window
Example
var ajaxCall = 'jax.call("community", "plugins,walls,ajaxSaveWall")'; cWindowShow(ajaxCall, 'Compose', 450, 300);