javascript - How to "pop out" an IFRAME within my document? -


i loading page same domain iframe on page.

after interacting javascript-driven form in iframe want take on entire document. can't set page's location of iframe because there's no way state want in passing url parameters.

all references can find jumping out of iframes page in iframe controlling popping out. want pop out iframe code in context of main document.

(my project google chrome user script interacting 3rd party site have no server control over.)

i'm using jquery vanilla javascript fine of course.

you can't "pop out" of iframe normal method (location.href = "..."), because lose form , js state.

likewise, code like:

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

would appear work not preserve js state.

it may possible iterate on frame's contents , copy structure and values current page, seems fool's errand me.

i recommend make look frame has taken over. can code 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 (); 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -