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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:58:00+00:00 2026-06-04T22:58:00+00:00

I need to pass a value from a parent to an iframe (on a

  • 0

I need to pass a value from a parent to an iframe (on a different server, not in my control) and have the value make a selection in a dropdown in the iframe.

Example: mydomain.com/?agent=12345 (target will be the iframe)

In the iframed page, the dropdown has several choices, I need to have the value in the url be the selected the choice corresponding to the selection when the link is clicked and the page is loaded in the iframe.

Is passing in the URL possible or do I use JS, PHP? If JS or PHP, how?

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-04T22:58:02+00:00Added an answer on June 4, 2026 at 10:58 pm

    You can use either.

    If PHP then use $_GET to read the parameter, and when building the page set selected=”selected” in the option that meets the requirements.

    If javascript then load the page as normal and then, onload, read the parameters and find the select box and set the select box appropriately.

    You’ll find PHP easier as this has the parameter in $_GET, whereas in Javascript you need to get the URL from the string (although there are functiosn on the web you can use). If you do use Javascript and haven’t done it before, use jQuery to set the select box as there are also plenty of examples available online.


    Editing answer (for archiving, based on clarifying comments below).

    Clarification was the iFrame can’t be edited as it belongs to another domain – so the manupulation has to come from the parent domain.

    Based on this – it’s not possible. Browser security prevents sites manipulating content in frames across domains. Otherwise you would be able to create a frame that completed the entire form for the user and submits it in their name. The only solution is to edit the child frame.

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

Sidebar

Related Questions

I have an ASP control custom built and I need to pass a value
I have two UITableViewControllers and need to pass the value from the child view
I need to pass a value from the onload event of a user control
How to pass value from parent to child window field. I use window.open(www.google.com); after
How to pass value from parent to child window field. I use window.open(www.google.com); after
I need to pass a value from PHP to C++. I think I can
I'm uwsing MVC and jqgrid and I need to pass a value from dropdownlist
I need to pass a string value from Form1 : public void button1_Click(object sender,
Situation is : when i select a value from a html.dropdown then i need
I have used DependencyProperty to pass value from textbox at silverlight page to external

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.