[Chameleon] How to dynamically load a widget
Paul Spencer
pspencer at dmsolutions.ca
Sat Sep 2 19:22:52 EDT 2006
You can add the same logic to GetJavascriptFunctions and anywhere
else that you return something to be added to the page.
Cheers
Paul
On 29-Aug-06, at 7:28 AM, Yahya Mohammad wrote:
> 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
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the Chameleon
mailing list