On Apr 25, 8:09 am, Nicolas <[email protected]> wrote:
> Hi there!
>
> I have an infowindow and it has an iframe calling a php file, this php
> file has a form (_POST). My problem is: when I submit the form via
> post method it opens a new browser window. My question is: how can I
> submit that form via post method without opening a new window? I need
> to refresh the iframe inside the infowindow without losing my
> infowindow
>
> This is part of my code:
>
> GEvent.addListener(map, "click", function(overlay, latlng) {
>         if (!overlay) {
>                 var lng = latlng.lng();
>                 var lat = latlng.lat();
>                 var obj = document.createElement('div');
>                 obj.id = 'balloonDiv';
>                 GDownloadUrl("login.php", function(data) {
>                         var iframe = document.createElement("iframe");
>                         iframe.setAttribute("id", "iframeRPC");
>                         iframe.innerHTML = data;
>                         obj.innerHTML = iframe.textContent;
>                         map.openInfoWindow(latlng,obj);
>                 });
>         }
> });

But the above would put the contents of the iframe into the div
(baloonDiv), and show the div, not the iframe, in the infowindow. The
php login form would be submitted as though it had been placed in the
surrounding parent page, not in the iframe.

Why not just put the iframe into the infowindow and set its .src to
'login.php' ??

CAUTION: The above may or may not be useful to you. Please read the
posting guidelines for this list.  It's good that you posted only what
you thought was the relevant bit of code, rather than pasting in the
whole page of HTML and Javascript. But without a link to your map (or
a simplified one that illustrates the problem), anyone answering you
is guessing from your code snippet. The experts and gurus of this list
have taught thousands of us how to do fun and useful things with the
Google Maps API. We don't want to wear out their helpfulness.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to