Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
Pass Data From Iframe to grandparent

So essentially I have a tough case here. I have a react app that contains an iframe, and within that iframe I have data I need to get all the way to the react application. I have access to the code of the react app, and I have access to the code of the inner most iframe. I do not have access to the code of the middle iframe. If it's at all necessary to know I'm using an embedded looker dashboard with custom visualizations.

I have considered placing this into the inner most iframe

window.parent.postMessage({ message: "getAppData", value: MyDataToPass }, "*");

But would this work? Or could I do

window.parent.parent.postMessage({ message: "getAppData", value: MyDataToPass }, "*");

If there's a way to do this that'd be super helpful

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

So I poked around for barely any time at all. Using window.parent.parent.postMessage({ message: "getAppData", value: MyDataToPass }, "*"); As stated above was the answer, and listening for the message in the react app allowed me to access the data I needed.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!