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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:16:12+00:00 2026-06-13T04:16:12+00:00

I would like to grab the parameters from a page that contains an iframe

  • 0

I would like to grab the parameters from a page that contains an iframe, and append the parameters to the src of the iframe.

Example:

PAGE CONTAINING IFRAME–

http://www.example.com/pref.html?c=%433r3jutlut9se%23&e=test%40example.com

IFRAME IN THE ABOVE PAGE–

<iframe id="myiframe" name="myiframe" src="prefcontent.aspx" frameborder="0"
width="100%" height="800"></iframe>

Here’s one of the many things I’ve tried, which I thought would work in theory, but I had no luck with it:

<script language="javascript">
$(function() {

    var loc = window.location.toString(),
    params = loc.split('?')[1],
    params2 = loc.split('&')[2],
    iframe = $('#myiframe');

    console.log(params);

    iframe.src = iframe.src + '?' + params + '&' + params2;


});
</script>
  • 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-13T04:16:13+00:00Added an answer on June 13, 2026 at 4:16 am

    if your using jQuery you might want to strip down your code up:

    $(function() {
        var search = window.location.search;
        $("#myiframe").attr("src", $("#myiframe").attr("src")+search);
    });
    

    Use window.location.search; as it will snip off the hash tag at the end of the url and is a lot faster as it is native code.

    Then use jQuery selectors to find and replace the attribute of src on the iframe, with it’s current src plus the search acquired from this page.

    Hope this helps.

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

Sidebar

Related Questions

I would like to grab an element from a remote HTML page. As I
I would like to grab the prices of products from newegg. heres an example
Would like to make anapplication in Java that will not automatically parse parameters used
I would like to grab a kanji table on a Wikipedia page and I
I would like to grab data from a certain website periodically (every 2-3 hours).
I would like to grab data from a table without using regular expressions. I've
I would like to grab an audio file from the iOS device's iTunes library,
I would like to grab a number from a string. The string is: responseID:
I would like to grab a pki certificate when a request happens in jersey
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode

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.