[Chameleon] LayerManager widget doesnt always work
Julien-Samuel Lacroix
jlacroix at mapgears.com
Mon Jul 17 09:41:13 EDT 2006
Hi,
Try changing the function like this in LayerManagerAction.widget.php.
Let us know if it helps.
function {$szJsFunctionName}(obj, szAction)
{
var oElement = document.getElementById('LAYERMANAGER_ACTION');
oElement.value = szAction;
{$this->mszHTMLForm}.submit();
return;
}
Is the problem is browser specific? Did you succesfully reproduce it on
IE and Firefox?
Julien
Doug H wrote:
> Hi
> I have added a LayerManager widget to my map, which displays the popup
> layer manager window, and sometimes it adds or subtracts the layers
> from my map and sometimes it just stops working and I get an error
> that reads:
>
> Line: 26
> Char: 5
> Error: Invalid Syntax
> Code: 0
> URL:
> http://mapgis/chameleon/widgets/LayerManager/LayerManager.php?sid=44b6c8054bc8a
>
>
> if I 'view source' and look at line 26 I see this:
> document.forms[0].submit();
> which is located within this function here:
>
> function clickLayerManagerAction(obj, szAction)
> {
> document.forms[0]['LAYERMANAGER_ACTION'].value = szAction;
> document.forms[0].submit();
>
> return;
> }
>
> I found this functions origin in LayerManagerAction.widget.php and it
> looks like this:
>
> function {$szJsFunctionName}(obj, szAction)
> {
> {$this->mszHTMLForm}['LAYERMANAGER_ACTION'].value = szAction;
> {$this->mszHTMLForm}.submit();
>
> return;
> }
>
> and finally.. my widget looks like this:
>
> <CWC2 TYPE="layermanager"
> VISIBLE="TRUE"
> ENABLED="TRUE"
> POPUPWIDTH="475"
> POPUPHEIGHT="700"
> label="Layer Manager"
> STYLERESOURCE="TextButtons"
> TOOLBAR="TRUE"
> MENUBAR="TRUE"
> STATUS="TRUE" >
>
> <IMAGE STATE="normal"/>
> <IMAGE STATE="hover"/>
> <IMAGE STATE="selected"/>
>
> </CWC2>
>
> Like I said before, sometimes it works and sometimes it doesnt. It
> never really seems to add annotations but I know it has done it at
> least once. Does anyone have any suggestions as to what the problem
> might be?
> Thanks in advance,
> Doug
> _______________________________________________
> 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