Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:01:46+00:00 2026-06-04T18:01:46+00:00

I have a html, say A.html. I am invoking A.html inside of A.html inside

  • 0

I have a html, say A.html. I am invoking A.html inside of A.html inside an IFRAME.

A.html
<html>
.....
  <IFRAME>
    A.html (same domain, etc as A.html)
  </IFRAME>
</html>

This is a GWT app. This IFRAME is a popup, and when the user closes (clicks a close button) this popup (which is also loading the A.html as you can see above), I want to
fire an event to display some message on the outer A.html which means I need an access to codes outside of IFRAME. How can I achieve this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:01:47+00:00Added an answer on June 4, 2026 at 6:01 pm

    Since your iframe contents are being loaded from the same domain, you can call javascript functions on the containing page. I’m assuming that you’re asking about calling the code outside the iframe from GWT. If so, then you can use JSNI.

    For example, given the JSNI method:

    private final native void postClosedEvent()
    /*-{
        $wnd.functionDefinedOutside();
    }-*/    
    

    You could call the method within a GWT ClickHandler:

    closeButton.addClickHandler(new ClickHandler()
                                {
                                    public void onClick(ClickEvent e)
                                    {
                                        postClosedEvent()
                                    }
                                });
    

    This assumes a function defined using javascript in the containing page, for instance:

    <script type="text/javascript">
        var functionDefinedOutside =
            function()
            {
                alert("GOT MESSAGE FROM iframe");
            };
    </script>
    

    Note: If the iframe contents are loaded from a different domain, you can achieve the same result using postMessage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

let's say I have a html structure like this -> (note: in my code
Say I have this HTML fragment <td width=25% style=text-align:right; > <span style=font-family: Arial; font-size:
let's say I have this set of HTML-markup and CSS #CSS .inputhelp_text { background:
Okay so say I have a form element like this: HTML: <div class=form-item> <label>Current
Let's say we have two flash objects on the same html page. I want
Say I have html code similar to this: <a href=http://example.org/>Stuff I do want</a> <p>Stuff
let's say I have an HTML structure like this: <div class=first> <div class=sub-1> <div
Say I have this HTML: <html> <head> <title>Hello [[USER_FIRST_NAME]]</title> </head> <body> <p>Hi, [[USER_FIRST_NAME]] [[USER_LAST_NAME]]!</p>
Say I have HTML that looks like this: <p> May 4 - <a href=http://auburn.craigslist.org/web/2996976345.html>residual
Let's say I have some HTML like so: <div id=text>This <i>is</i> a <b>test</b>. Do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.