[Chameleon] clear NAV_CMD

Jesse Cleary jcleary at email.unc.edu
Wed May 9 17:49:20 EDT 2007


Thanks Julien

I've experimented with this code block already some.  I guess I'm not 
sure where to insert it.  I tried adding it into the zoom widget code at 
each point where a zoom function seems to be called, but this snippet 
breaks that code:
        PHP Parse error:  syntax error, unexpected '}'
Removing the curly braces kicks this error:
        PHP Parse error:  syntax error, unexpected '='

Not wanting to go much further before asking for advice I also tried adding:
        $this->SetNavCommand("");
which did not seem to have any effect.

Maybe I'm tinkering with the wrong file?  Even if it did work, wouldn't 
this change the zoom functionality over all of my Chameleon apps?

Sorry to bug you about this - I appreciate any further advice you might 
have...

Jesse



Julien-Samuel Lacroix wrote:
> Hi,
> Other widgets had this problem at a point. It was resolve by clearing 
> the NAV_CMD like you did. Widgets that submit the page, but don't use 
> the NAV_CMD parameter have to clear it before submitting. If you look 
> in the WMSBrowser widget for example, it clears the NAV_CMD on every 
> page submit like this:
>         {$this->mszHTMLForm}.NAV_CMD.value = "";
>         {$this->mszHTMLForm}.submit();
>
> This should be enough to deactivate the other Navigation tools. Let us 
> know if you have any problem with this.
>
> Best regards,
> Julien
>
> Jesse Cleary wrote:
>> Hi folks
>>
>> I'm working on a very simple Chameleon based map with onmouseover and 
>> onclick functionality using a customization of the MapTips widget.  
>> Because of the onClick bit, my ZoomIn and ZoomOut widgets are 
>> presenting a problem.  Because they remain active after the map 
>> refreshes, a user's onClick action to get a MapTip also activates the 
>> selected widget asugin another refresh and not the desired onclick 
>> event.  I've tried to clear the NAV_CMD variable in my custom MapTips 
>> JS but I can't get that code fired ahead of the Zoom actions.  I'm 
>> using the scale zoom in the interim which provides a less desirable 
>> zoom function.
>>
>> Any ideas on how to clear the NAV_CMD variable and/or de-select the 
>> Zoom widgets after refresh without tinkering with the base Zoom 
>> widget code?  The base code powers several other Chameleon apps that 
>> I don't want this fix applied to.  Thanks for any ideas you can 
>> suggest...
>>
>> Jesse
>>
>> Chameleon 2.4 (non JSAPI)
>> with MS 4.8.1
>> on Fedora Core 4
>>
>

-- 
Jesse Cleary				
Department of Marine Sciences	
UNC Chapel Hill

334 Chapman Hall
(919) 962-4987 

jcleary at email.unc.edu












More information about the Chameleon mailing list