[Chameleon] How to dynamically load a widget
    Julien-Samuel Lacroix 
    jlacroix at mapgears.com
       
    Mon Sep  4 16:10:23 EDT 2006
    
    
  
Late response, I don't know if you still have the problem.
You will have to "sort out" the functions in GetJavascriptFunctions too.
Julien
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
-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
    
    
More information about the Chameleon
mailing list