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

  • SEARCH
  • Home
  • 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 7931289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:40:22+00:00 2026-06-03T20:40:22+00:00

How would I pass a variable to an iframe which is on the same

  • 0

How would I pass a variable to an iframe which is on the same domain.

The most logical way I can think of would be to use a session variable or cookie?

To put this in context it is the category of a wordpress page.

  • 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-03T20:40:23+00:00Added an answer on June 3, 2026 at 8:40 pm

    You can access the parent window using the parent keyword in javascript

    Example:

    var newValue = parent.getElementById('inputValue').value;
    

    accessing the child window is also possible

    var iframeElement = document.getElementById("MyFrame");
    
    var ifram = (iframeElement.contentWindow) ? iframeElement.contentWindow : (iframeElement.contentDocument.document) ? iframeElement.contentDocument.document : iframeElement.contentDocument;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know how can I pass a ruby variable inside an
I would pass a variable between two def inside a function. How can i
I would like to choose which variable to pass to a funciton based on
I would like to pass the environment variable to the glassfish domain.xml as the
How would I pass a Python variable to the Bash shell? It should work
I would like to pass a variable to the binary operator $. Let's say
I would like to pass a variable from one Controller Action to another and
I want to pass a variable in my parent window to an iframe html
I would like to pass the variable from a function to the main scope
I would like to pass a dynamic variable as a parameter to my attribute.

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.