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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:41:28+00:00 2026-06-06T19:41:28+00:00

I am loading a page from the same domain into an iframe on my

  • 0

I am loading a page from the same domain into an iframe on my page.

After interacting with a JavaScript-driven form in the iframe I then want it to take over entire document. I can’t just set my page’s location to that of the iframe because there’s no way to get it to the state I want it in by passing URL parameters.

All references I can find for jumping out of iframes is about the page in the iframe controlling the popping out. I want to pop out the iframe from code which is in the context of the main document.

(My project is actually a Google Chrome user script interacting with a 3rd party site that I have no server control over.)

I’m using jQuery but vanilla JavaScript is also fine of course.

  • 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-06T19:41:29+00:00Added an answer on June 6, 2026 at 7:41 pm

    You can’t truly “pop out” of the iframe by the normal method (location.href = "..."), because you will lose your form and JS state.

    Likewise, code like:

    document.head=frames[0].document.head;
    document.body=frames[0].document.body;
    

    Would appear to work but would not preserve the JS state.

    It may be possible to iterate over the frame’s contents and copy structure and values to the current page, but this seems like a fool’s errand to me.

    I recommend that you just make it look like the frame has taken over. You can do that with code like this:

    var usurpingFrame = $("YOUR FRAME SELECTOR");
    usurpingFrame.css ( {
        position:   "fixed",
        top:        "0",
        left:       "0",
        "z-index":  "8888",
        margin:     "0",
        height:     "100%",
        border:     "none"
    } );
    usurpingFrame.width ($(window).width() );
    $("*").not (usurpingFrame).not (usurpingFrame.parents() ).hide ();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On loading the page I want to pass a value to my javascript function
I'm loading a page in an iframe colorbox. On this page there's a form
I want to show page loading spinner in my html page content using jquery
We have a third-party external web page on another domain that we're loading in
I have an HTTPS page which has an iframe src=https://.... from a 3rd party
I am loading a webpage into a webview from the database with the loadDataWithBaseURL()
Can I make an AJAX call immediately after loading a page? To be more
I'm using mootools 1.2 in a page where I'm loading a js graph into
I want to write some javascript and have it call into the DOM for
I'm loading local .html files into a UIWebView, then if the user clicks on

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.