[Chameleon] How to dynamically load a widget
Yahya Mohammad
mfyahya at gmail.com
Tue Aug 29 07:28:32 EDT 2006
Hi all,
I created a custom widget and want it to show up only when a certain GET
parameter is passed initially in the application URL. I tried changing the
DrawPublish function like this:
function DrawPublish()
{
if (strtoupper($this->getVar('MYVAR')) == 'MYVALUE') {
return $this->moButton->DrawPublish();
} else {
return '<!-- MYWIDGET widget hidden -->';
}
}
This works pretty well, except that the javascript functions I defined in
GetJavascriptFunctions still show up on the page. Is there a better way to do
this?
-Yahya
More information about the Chameleon
mailing list