[ka-Map-users] iframe passing extents back to containing page

Paul Spencer pspencer at dmsolutions.ca
Mon Jul 31 15:57:42 EDT 2006


Percy,

I'll try to catch you on IRC (pagameba) but in case I don't ...

If your iframe is loaded from the same site as your main page, then  
you are allowed to script between them.  Whatever triggers your  
query, you can do one of the following:

1) from the main page (in response to clicking a button or  
something), you can call the kaMap object in the frame ...

document.getElementById('frameid').contentWindow.myKaMap.getExtents();

2) from the iframe (in response to an event for instance), you can  
call a function in the parent window ...

window.parent.someFunction();

Cheers

Paul

On 31-Jul-06, at 1:19 PM, percy wrote:

> I would like to embed a kamap iframe within a database search page and
> have it pass back the extent of what the user has zoomed to so that I
> can use this in a query to my database.
>
> the goofy part is that the embedding page is a Perl CGI, so I think  
> I'm stuck using Perl mapscript to access the iframe's properties.
>
> any hints on the best way to do this? I'm on the IRC right now...
>
> thanks,
> percy
>
> PS I searched the mailing list archives already...
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+






More information about the ka-Map-users mailing list