Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #35881

Re: Send ref to frame element

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Send ref to frame element
Date 2018-12-10 04:17 +0100
Organization PointedEars Software (PES)
Message-ID <0ea49468-0e46-7ba3-746f-5904e16bfa2d@PointedEars.de> (permalink)
References (3 earlier) <99683cda-67ca-43b7-b7b4-acd032ae02a6@googlegroups.com> <HfWdnZnt8M6CPJDBnZ2dnUU7-RXNnZ2d@westnet.com.au> <lsWdnd2Dga9rPpDBnZ2dnUU7-efNnZ2d@westnet.com.au> <0e19821d-1ee7-4959-9c69-426742f7445c@googlegroups.com> <nO-dnXKkzupvWZDBnZ2dnUU7-KPNnZ2d@westnet.com.au>

Show all headers | View raw


Andrew Poulos wrote:

> On 10/12/2018 11:10 am, Julio Di Egidio wrote:
>> On Monday, 10 December 2018 00:23:43 UTC+1, Andrew Poulos  wrote:
>>> I tried
>>> window.parent.document.getElementById("frm").
>>>    contentWindow.postMessage(JSON.stringify(obj), '*');
>>
>> Again, you don't need to serialise/deserialise the message:
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> <https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage>
> 
> Ah, thanks. How do I deserialise the received message?

You are not paying attention.  I have marked the important part for you.

>>> and it seems to work ie. it doesn't throw an error. And I thought that
>>> document.getElementById("frm") and window.frames["frm"] were identical -
>>>    when referencing the same iframe :-(  [I have fixed the parentheses.]
>>
>> You just cannot index window.frames by frame name:

Sure you can.  My category filter in
<http://PointedEars.de/ufpdb/main.en> that does just this –

      function callDBfilter(filterID)
      {
        parent.frames['ufpdb_index'].setDBfilter(filterID);
        return false;
      }

– still works in all frame-DOM-supporting user agents.
May it have a Happy 14th Birthday!

>> <https://developer.mozilla.org/en-US/docs/Web/API/Window/frames>
>>
>> Indexing by frame name existed in IE once upon a time...

Utter nonsense.  The MDN article is hopelessly incomplete and the
wannabe–troll has *still* no clue what he is talking about.

There is just a difference between a frame *name* and a frame *ID*.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-06 15:57 +1100
  Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-06 19:02 +1100
  Re: Send ref to frame element "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-12-06 10:05 +0100
    Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-09 19:44 +1100
      Re: Send ref to frame element JJ <jj4public@vfemail.net> - 2018-12-09 16:22 +0700
  Re: Send ref to frame element Julio Di Egidio <julio@diegidio.name> - 2018-12-09 01:46 -0800
    Re: Send ref to frame element Julio Di Egidio <julio@diegidio.name> - 2018-12-09 02:06 -0800
      Re: Send ref to frame element Julio Di Egidio <julio@diegidio.name> - 2018-12-09 02:51 -0800
        Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-10 10:11 +1100
          Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-10 10:23 +1100
            Re: Send ref to frame element Julio Di Egidio <julio@diegidio.name> - 2018-12-09 16:10 -0800
              Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-10 12:44 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-10 04:17 +0100
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-10 15:25 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-10 21:28 +0100
                Re: Send ref to frame element "Mark-" <nospam@mapson.xyz> - 2018-12-11 15:41 +0000
                Re: Send ref to frame element Julio Di Egidio <julio@diegidio.name> - 2018-12-10 14:21 -0800
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-11 14:48 +1100
                Re: Send ref to frame element Julio Di Egidio <julio@diegidio.name> - 2018-12-10 23:37 -0800
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-12 07:51 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-11 22:52 +0100
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-12 09:37 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-13 17:31 +0100
                Re: Send ref to frame element "Mark-" <nospam@mapson.xyz> - 2018-12-13 17:33 +0000
                Re: Send ref to frame element "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-12-13 19:19 +0100
                Re: Send ref to frame element "Mark-" <nospam@mapson.xyz> - 2018-12-13 20:27 +0000
                Re: Send ref to frame element "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-12-13 19:17 +0100
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-14 07:56 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-13 22:44 +0100
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-14 09:21 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-14 01:08 +0100
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-14 12:54 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-14 16:04 +0100
                Re: Send ref to frame element Andrew Poulos <ap_prog@hotmail.com> - 2018-12-15 06:32 +1100
                Re: Send ref to frame element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-12-15 01:11 +0100

csiph-web