Hello,
if i understand correctly  your problem is not related to GWT but to the
fact that you are attempting cross-origin communications that are forbidden
by the browser.

Probably the right path is to try to use Window.postMessage()
(https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)
to notify the gwt application to close the window.
In case check the support of the api.

Cheers,
   Alberto.



On Fri, Sep 4, 2015 at 11:51 AM abdul <[email protected]> wrote:

> I have developed application using GWT 2.5. When i click on "Click to
> Open Window" it will open a popup panel wrapping a content from different
> server loaded inside the Frame.My requirement is to close the popup panel
> when cancel button is clicked which is loaded from different server.How to
> Close the popup panel(which is created in main application) its throwing
> SOP issue?Any suggestion how to solve this same origin policy issue?Below
> is the code
>
> Main Application Code:(http://localhost:8080/FirstApp/GWTParentApp.html)
>     btn.addClickHandler(new ClickHandler() {
>                 @Override
>                 public void onClick(ClickEvent event) {
>                     openWindow();
>                 }
>             });
>     private void openWindow(){
>             PopupPanel dialog=new PopupPanel();
>             HTMLPanel panel=new HTMLPanel("");
>             Frame f=new 
> Frame("http://klk7-moham:9090/SecondApp.war/GWTReport.html";);
>             f.getElement().setId("dummyId");
>             panel.add(f);
>             dialog.add(panel);
>             dialog.setSize("1000", "1000");
>             dialog.show();
>             dialog.center();
>             dialog.setAnimationEnabled(true);
>         }
>
> Report Application Code:(http://localhost:9090/SecondApp.war/GWTReport.html)
>     <script>
>     function redirectPage(){
>
>         //Code which close the popup panel
>     }
>     </script>
>     <div >
>         <button type="button" name="cancel"
>             id="cancelN_" class="bp"
>             onmouseover="this.className = 'bp bph'"
>             onmouseout="this.className = 'bp'"
>             onclick="redirectPage()" style="">Cancel</button>
>     </div>
>
> [image: enter image description here] <http://i.stack.imgur.com/gFNEB.png>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to