![]() ![]() Parent.aa() //Call the function of the parent pageĪlrt(("Text1").value) //Call the element of the parent page Tt.test() //Call the function of the subpage ![]() The contentWindow attribute is the window object where the specified frame or iframe is located, which can be omitted under IE.Īlrt(.innerHTML) Īlrt(tt.document.getElementById("Text1").value) //Call the element of the subpage IfrId is the id of the iframe frame, b() is the child page js function. The following methods support ie and firefox browsers,ĭocument.getElementById('ifrId').contentWindow.b() The iframe parent page calls the child page js function. This method supports ie, firefox browsers.Ģ. In chrome 5+, window.parent cannot run in the file://protocol, put it in the web container for testing It's normal, and the http protocol is normal. ![]() For example, to call the a() function, it would be written as: The iframe child page calls the parent page js function and theĬhild page calls the parent page function only need window.praent. Please ignore all JavaScript from option anycodings_css 1. When the content of the anycodings_css iframe's page is changed, the height of anycodings_css the iframe needs to be adjusted equally. Now access the iframe document via: contentDocument > documentElement (HTML-tag) > scrollHeightĭocument.getElementById("static_container").style.height = + "px" įurthermore I really need to stress out anycodings_css that this solution only works with anycodings_css static content. Var elementIframe = document.getElementById("static_container") Second you need coding to detect when anycodings_css the page has completed loading. It will anycodings_css result in an access denied. Remember anycodings_css you can't do cross-domain calls. Sandbox so you can use pages anycodings_css from the same trusted source. Seamless allows the iFrame to have a anycodings_css transparent background, flows with the anycodings_css document. I'm going to provide a solution for anycodings_css option 1 and 2. However this will be a daunting task and the road to this will be full of potholes. Hide the scroll bar in the iframe, but detect scroll somehow.Fill up the iframe inside the content div.You need to know the content height of the page that was loaded into the iframe and adjust the iframe correspondently. ![]() If I'm still correct, If the anycodings_css content of the iframe scrolls, it should anycodings_css actually scroll the main page? Some much for the simple anycodings_css part. If I'm correct you want anycodings_css to change the div static-container into anycodings_css an iframe. I do not know exactly what you need, but anycodings_css I have a clue. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |