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 8599335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:22:33+00:00 2026-06-12T01:22:33+00:00

When the page loads it includes an 3rd party iframe (read: file uploader). I

  • 0

When the page loads it includes an 3rd party iframe (read: file uploader). I select a file, click the “start upload” button and once the upload is complete I get a “thank you – upload complete” message.

  • There is no Ajax response (that I know of).

  • The 3rd party does allow me to specify the message. I can also add … to that message.

Once the upload is complete I need to update a hidden input with the upload_file_id which I know from the start. What I wanting to catch / use if the “upload complete” message / moment / event. But the dynamic-ness of the page is somewhat new to me and I could use some support.

Thanks in advance.

  • 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-12T01:22:35+00:00Added an answer on June 12, 2026 at 1:22 am

    Unfortunately, you wont be able to access any useful properties of the iframe unless it is within the same host/domain as your code. This is a security feature implemented by all current/worthy browsers – called the same-origin or cross-domain policy.

    The only options you have of detecting the changes in a third-party iframe are if the third-party code supports sending a message out to the surrounding frame. There are a few ways of doing this, but they need to support it. If they don’t, there isn’t much you can do. If it were me I would check the following:

    1. Read the third-party documentation, see if they support triggering any js messages or events
    2. See if the third-party system offers another way, beside iframe, to implement the same ability.

    script tags?


    With regard to the message you can add, have you tested to see if you can add any HTML tags to that message? It’s unlikely, but if so, you could add your own script tag to communicate back to your frame, to trigger your own function (i.e. `window.iframeSuccess`) and tell you the event has occured…

    The following code will only work – again – if both sides are of the same domain (the outer frame and the iframe). Otherwise it’ll be blocked by the same-origin policy.

    <script>
    if( window && window.parent && window.parent.iframeSuccess ){
      window.parent.iframeSuccess();
    }
    </script>
    

    Instead you could implement the following which has been designed precisely for the communication between frames. It’s a more modern solution so wont work on older browsers – to see what supports it you could read here:

    What browsers support the window.postMessage call now?

    An example of how to use window.postMessage – first the code in the outer frame:

    function messageListener(event){
      /// make sure we only get messages from where we expect
      if ( event.origin != "http://the-domain-we-expect-from.com" ){ return; }
      /// here you can do what you want depending on the message you get
      alert(event.data);
    }
    
    /// define for nearly every modern browser
    if (window.addEventListener){
      addEventListener("message", messageListener, false);
    } else {
      /// fallback for internet explorer
      attachEvent("onmessage", messageListener);
    }
    

    Then the code placed in the iframe:

    if( window && window.parent && window.parent.postMessage ){
      window.parent.postMessage('success', 
         'http://the-domain-we-are-sending-to.com');
    }
    

    for more information you can read here:

    https://developer.mozilla.org/en-US/docs/DOM/window.postMessage

    image tag?

    If they block script tags it’s possible they may allow image tags. If this is the case you have a slightly trickier option available which is to embed an image that reports back to a server-side script, which can then flag the event in a database…

    <img src="http://mysite.com/image-that-is-actually-a-script.php?id=user-id" />
    

    however to get your javascript to notice this event you will need some sort of polling system that is constantly checking your server-side database from your js (via ajax or websockets) – and you will need to be able to uniquely identify the user on both sides (yours and the third-party) with an id of some sort. So this method is really only possible if the third-party system allows you to insert the user id (or some other unique user information) into the message shown to the user. This is pretty much a last fallback if you have no other option.

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

Sidebar

Related Questions

I would like for the pop up to appear once the page loads, without
What I'm trying to do: Create a 'grid' once the page loads with some
I have an aspx page that includes a javascript file in the head tag.
My native app includes a WebView, and the WebView loads a web page off
My page loads a TextView which is scrollable. Unfortunately the position appears to stick
My Jquery ajax page loads and shows up in the DIV that lays itself
When my Silverlight page loads, I want to set focus on a control. Simple
After my page loads my text disappears and I am having trouble determining why.
everytime my page loads, im supposed to create a datatable (also a jquery plugin)
I have an html page that open a popup window when the page loads.

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.