Re: FAQ Topic - How do I communicate between frames in a web browser? (2009-08-28)



In comp.lang.javascript message <h7qero$3m5$1@xxxxxxxxxxxxx
september.org>, Fri, 4 Sep 2009 00:15:59, Garrett Smith
<dhtmlkitchen@xxxxxxxxx> posted:
Dr J R Stockton wrote:
In comp.lang.javascript message <h7ifk3$av2$1@xxxxxxxxxxxxx
september.org>, Mon, 31 Aug 2009 23:39:57, Garrett Smith
<dhtmlkitchen@xxxxxxxxx> posted:
I've redrafted the entire entry. I found much more questions and
discussion in the archives regarding iframes than frameset, so I
changed the question. Here is the draft:

| 9.2 How do I access an iframe's content?
Would it not be better to cover both frames and iframes?


IFRAME is much more common for the past five years or so. I think it is
the more important case to cover.

Sholdn't be too complicated to cover both IFRAME and FRAMESET.

Draft:-


========================================================================
| 9.2 How do I access a frame's content?
|
| To reference another frame on the same domain:
|
| A frame's content window can be found from the frames collection.
|
| Example:
|
| var fwin;
| fwin = self.frames[0]; // or:
| fwin = self.frames["iframeName"];
|
| or from the IFRAME or FRAME element:
|
| var iframeEl = document.getElementById("myFrame");
| var fwin = iframeEl.contentWindow;
|
| An identifier moomin in the the iframe's content window, is accessed
| as fwin.moomin.
|
| To communicate between frames on different domains:

| Where supported, (IE8, Firefox 3, Opera 9, Safari 4), use
| window.postMessage( message[, port], otherDomain); where supported .

You duplicated "where supported".

One should talk like that for Web authoring, since page readers may have
any JavaScript browser; only on a controlled intranet. Note
<http://en.wikipedia.org/wiki/Template:Msieshare1>. Code requiring IE
at least version 8 will not work for at least 45% of all users.

Method window.postMessage( message[, port], otherDomain) was introduced
in IE8, Firefox 3, Opera 9, Safari 4.
(if not at first release of those, need
introduction version or rephrasing)

Given that browsers without window.postMessage must be fully supported,
is there advantage to authors in adding code for that too (except where
paid by the yard)?


| Example:


In code offered to the public, one should only use for the names of
variables etc. either words that one can spell correctly or strings that
don't look like spelling mistakes.

In examples exposed to the public, good international standard English
should be used, eschewing local or populist terminology.





Please remember that work on the FAQ does not become useful until it is
published; the Web version is "Updated July 12, 2009".

I think it can be published soon. Let me know what your feedback is on this.

As has been said before, you should be generating revised sections by
and after discussion here; and, as soon as a changed version is better
than what was there before, or a new section is significantly better
than nothing, it should be posted here - if few agonised shrieks appear,
it should then immediately go into the FAQ at jibbering (which AIUI is
what Bart uses daily). You should not save things for a wildly-
different new edition.



I've updated some FAQ links at Wikipedia; could there be a way of using
Google, etc., to locate all CLJ FAQ links in Wikipedia? Including non-
English pages?? Or can Jibbering's stats identify where requests for
old-style anchors come from?

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
.



Relevant Pages

  • Re: Inline frames, die, die, die (aka please help!)
    ... IFrames have all of the same annoying problems as do frames. ... > .php page as well. ... > Another solution is just have these pages open in new browser window. ... > will go directly to the IFrame content, ...
    (microsoft.public.frontpage.client)
  • Re: Inline frames, die, die, die (aka please help!)
    ... IFrames have all of the same annoying problems as do frames. ... >>> .php page as well. ... >>> Another solution is just have these pages open in new browser window. ... >>> will go directly to the IFrame content, ...
    (microsoft.public.frontpage.client)
  • Re: FAQ Topic - How do I communicate between frames in a web browser? (2009-08-28)
    ... september.org>, Sun, 6 Sep 2009 10:43:20, Garrett Smith ... any JavaScript browser; ... That image depicts IE8 as having 10% share. ... the NAME of the FRAME or IFRAME. ...
    (comp.lang.javascript)
  • Re: How to publish external content in a div
    ... In particular, frames are not deprecated. ... only have the one same simplistic Rails solution. ... I think AJAH suits my purpose. ... As a pragmatic alternative, I use <iframe>. ...
    (comp.infosystems.www.authoring.html)
  • Re: Directing hyperlinks to a different frame, not page
    ... Much easier to make your JAlbum emulate your page design. ... Frames will give you a headache, they're bad for your eyes and they will ... I had been trying to incorporate an iframe, or some other way, ... The brelade thread, and perhaps this ...
    (microsoft.public.publisher.webdesign)

Loading