[fusion-users] fusion widget / invokeurl questions

Paul Deschamps pdeschamps at dmsolutions.ca
Wed Mar 26 11:43:46 EDT 2008


In JS you can access the parent window from the IFrame by using
"top.window" within the IFrame.

For example here's a little snipit that allows the IFrame to use the
Fusion JS Object and call a function:

var mapWidget = top.window.Fusion.getMapById('mapArea'); 
var maps = mapWidget.getAllMaps(); 
var map = maps[0];
					
map.loadMap('<?php echo $szDestination."/".$aData["mapname"]?>.map');

Cheers

Paul D. 


On Wed, 2008-03-26 at 08:32 -0700, Jason Birch wrote:
> Larry wrote:
> -----------
> I've tried to use some of the functions from the ZoomXXX widgets, but
> there was never any communication between the task pane and the map.
> Firebug (firefox extension) would always report that 'Fusion', or some
> related function, was not defined.
> -----------
> 
> I'm guessing that is because the task pane is an iFrame.  I'm not sure
> how you reference the parent window from an iFrame in a cross-browser way...
> 
> Jason
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users



More information about the fusion-users mailing list