|
Posted by Chris Ianson on 04/06/06 17:37
"Marcello" <marcello.antolino@gmail.com> wrote in message
news:1144327408.574209.5060@v46g2000cwv.googlegroups.com...
> I've never used Google Maps API, so I don't know if you have access to
> code on the parent window. If you do, put a function over there that
> access the Google Maps one, and your function in the IFrame then access
> your function in the parent frame.
Yep we actually just tried something similar.
The parent page now declares a map function called "walk()".
The child page (iframe) should no longer make its own changes to the iframe
contents. When it wants to jump, it should make calls like
"javascript:parent.walk(3)"
[if you're unfamiliar with what is going on in the iframe from a previous
discussion here, there's an example at
http://www.cjse.pwp.blueyonder.co.uk/misc/A1master.htm]
The parent code will then update the map *and* update the iframe contents.
Simple.
Trouble is, it means that navigating in the iframe then relies on JS, which
rules out around 10% of people. Their loss sure, but still not ideal. We
are looking to keep the navigation as HTML.
> If that still doesn't work, try putting and invisible FRAME (not
> IFrame) in the parent window to do the same 'proxy function' approach.
> I had to do it once, in another problem. For some reason it was not
> working from parent to child <-> child to parent frames, but taking
> this proxy function approach solved the problem.
Have passed this on to the other designer and will keep fingers crossed!
> Also, are you passing 'objects' or functions as parameters in this
> call?
Only as above really.
Thanks for your constructive reply Marcello. You seem to have understood
what we are after. Cheers.
Navigation:
[Reply to this message]
|