How Do I Communicate Between Frames In A Web Browser?
Aug 20, 2006
To reference another frame, you simply need to step through the
frame hierarchy: `` parent '' is the page the frame is defined
in, `` parent.framename '' is another frame in the same frameset.
To access a variable called Moomin in a frame called Snork you
would use `` parent.Snork.Moomin ''. To call the function Snufkin
in that frame you would use `` parent.Snork.Snufkin() ''....
Is there a way to communicate between iframes on different subdomains? e.g. from one.dot.com to two.dot.com? there is a security access restriction passing javascript commands between subdomains that we've run into.
How can I use XMLHttpRequest communicate from webpage to another? Currently I have a left/right frames, when the submit button pressed (item is added to the database), the left frame should automatically retrieve this item and display it on the page.
I thought of using Ajax (XMLHttpRequest object), but not sure how to use XMLHttpRequest object in two different webpages.
I have a Flash movie on a web page and I want to send parameters to it with JavaScript to have it go to a selected frame. The AS3 code receives its information via an ExternalInterface API. The following code parses the URL argument (?page=x) and I want to send the value (x) to Flash. Unfortunately, when creating the objMovie variable, it is always undefined, therefore getFlashMovie is undefined and Flash never receives the callback. Thinking that it was because the flash movie is not loaded yet, I created a button to call callToActionscript, and when I click the button, I get the same error. (getFlashMovie("myFlashMovie") is undefined)
Also, if (params) always returns true, whether there are parameters or not. I don't understand that, either.
The code follows: <script > $(document).ready(function() { var params=getQueryParameters(); if(params) { callToActionscript(params[0]); }}); function getFlashMovie(movieName) { var isIE = navigator.appName.indexOf("Microsoft") != -1; var objMovie = (isIE) ? window[movieName] : document[movieName]; alert(objMovie); //Always return undefined return objMovie; } function callToActionscript(page) { var myMovie=getFlashMovie("myFlashMovie").sentToActionscript(page); } function getQueryParameters() { var query = window.location.href.split('?')[1]; //query won't be set if ? isn't in the URL if(!query) { return { }; } else{ var param = query.split('='); } return param[1]; } </script>
I'm trying to access a child iframe from my parent page. Is it possible? I've googled this extensively ut have found only scripts that allow me to communicate from the child iframe to the parent iframe. I want to do it the other way round. I need to be able to get in to the child frame and access it's DOM.
I have a web site. The user input is a record id. When the form is submitted, the cgi code will check if the id is in the data base, if its in the database, it will be processed, and results being displayed. If the id is not in the database, I need to pop up a window telling the user the next available id, and when the user closes the popup window, the browser should go back to the first form submit page, with the next available id in the input box.
Right now, I can pop up an alert window telling the next available id, but have no idea how to go back to the submit page when I close the alert window.
As a rule, I don't like frames but I'm stuck supporting a web that uses them. I have a page, default.asp, that has a header and body frame: "fHead" and "fBody". What I want to do is to prevent default.asp from ever loading itself into "fBody". Some users still have code that causes this behavior.
So how, using javascript , can I do something to the effect of: "If default.asp tries to load default.asp (itself) into fBody, then reload the top-level browser window with what fBody is trying to load."
my main page consists of frames. i'm using ssi to include copyright info, tos, and a privacy statement at the bottom of each page.
the ssi is working on all regular (ie non-frame) pages, but it doesn't seem to be called or parsed on the main page.
a look at the source shows the ssi call just sitting there, doing nothing. has anyone dealt with this before? i didn't think it mattered if an ssi was called from within a framed page, but i might be wrong.
i suppose i can just use the actual html for that one page but i'd rather just be able to use ssi since it's used through out the rest of the site.
Let me just start by saying... and I truly do mean this... I HATE frames. Now that I have that out of my system, unfortnualty I do not have a choice and am forced to use the complex structure that I am so SO needing help with. My framesets look like this
--------------------- | title | |-------------------- | buttons | |-------------------- | base | |--------------------
inside the base frame I have ANOTHER frameset... split into frmLeft and frmRight... now if your mind isnt tied into knots... I am sure this will do it... I have a button called 'add category', which is on the buttons frame. When I click the button, I get a popup with the details... I add the category details... then I need the frame titled frmLeft to refresh. Is this possible?
What's the trick to sharing cookies between frames? I can set and read a cookie in the same frame, but if I try to read the cookie in another frame it is undefined. :o(
There are some other cookies that are available in all frames, so I know that the frames are capable of reading cookies, just not the ones that I set in the other frame.
I apologize if this is not the right group for this, but I saw some other messages on this topic in here, so thought I'd take a shot in the dark...
I am running IE 6, XP, SP2. When I connect to certain sites that use inline frames, I get the message 'Your browser does not support inline frames or is currently configured not to display inline frames.'
The aggravating thing is I recently bought multiple Dell computers, have 2 in the room with me right now, haven't touched a thing browser-wise on either, and it works fine on 1 and not the other. Same OS, same IE version, etc.
How can I refresh a page in a separate frame. For example, when someone logs in in the main frmae, I want to refresh another frame to display info differently.
I am using frames - yes frames - I do not know how to do anything but and I know that there is better out there......but........ I am trying to set a frame so that it automatically puts a page corresponding to the month in that frame (a calendar) Code:
I have a script for printing the contents of a frame. It works fine but I would like it not only to print the designated frame but to add a header or message at the top or bottom.
i'm trying to use javascript to change the content of a textbox in a different frame.
by clicking on a 'folder' link in 'leftFrame' i want to put the value assigned by that link into the 'folderName' textbox in the 'uploadForm' form in 'mainFrame'. i'm doing this as...
this works perfectly fine with IE and Safari on my Mac OS X machine and IE 6 on my PC laptop but anything Mozilla-based on either machine gives me an error i just can't seem to get round...
Suppose I have a page, call in parent.html . Inside, there is an iframe, call it child.html . I want it so that in response to a keyboard event in either parent or child, child.html will respond in a particular way.
Do I need to use a different set of code for each html page, or can I reuse the same code?
If the code is different, what are the fundamental differences in code?
How do I make one frame respond to events in a different frame as a general rule?