Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #35869 > unrolled thread
| Started by | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| First post | 2018-12-06 15:57 +1100 |
| Last post | 2018-12-15 01:11 +0100 |
| Articles | 15 on this page of 35 — 6 participants |
Back to article view | Back to comp.lang.javascript
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
Page 2 of 2 — ← Prev page 1 [2]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-12-11 22:52 +0100 |
| Message-ID | <b0a1ca63-1f9d-7a6d-8023-125408dcba41@PointedEars.de> |
| In reply to | #35885 |
Andrew Poulos wrote:
> On 11/12/2018 9:21 am, Julio Di Egidio wrote:
>> On Monday, 10 December 2018 05:25:46 UTC+1, Andrew Poulos wrote:
>>> I set the frame name that matched the frame ID yet, for me, using
>>> window.frames('frm').contentWindow.postM... failed while
>>> document.getElementById('frm').contentWindow.postM... didn't.
>>
>> Trust the spec, not that fucking retard: he is full of shit, just as abusive
>> as he is completely clueless.
Whatever that means, MDN is not “the spec”. It is a Wiki that is maintained
by volunteers (including me; had I found that article before, and had I had
the time to fix it, I would have).
And my *working* code trumps all “specs”. It has not been working
*unchanged* for 15 years, and is going to continue to work (as long as
frames are supported), by accident. Trust me. I *know* what I am doing,
from now 20 years of private and professional experience with this stuff.
>> That said, if *you* cannot even keep round vs square brackets straight (and
>> I had pointed out even that one), just get another job...
>
> Gosh, you guys both found a typo! Calm down, I'll have a word to my editor.
You should have a word with yourself instead so that you pay more attention
to what you read, lest you waste everybody’s time (including yours, but ours
is arguably more precious). And drop the hubris while you are at it.
It required *two attempts* to tell you that you do NOT have to
serialize/unserialize, although you had been told this in no uncertain terms.
And apparently you *still* do not realize that the reason *why* your code
did not work *has been told to you* by the browser’s script console had you
looked at it (F12).
Because it *certainly* said something along the lines of
| window.frames is *not a function*.
^^^^^^^^^^^^^^
(emphasis mine).
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2018-12-12 09:37 +1100 |
| Message-ID | <Y5-dncxvnry4oY3BnZ2dnUU7-bvNnZ2d@westnet.com.au> |
| In reply to | #35889 |
On 12/12/2018 8:52 am, Thomas 'PointedEars' Lahn wrote: > It required *two attempts* to tell you that you do NOT have to > serialize/unserialize, although you had been told this in no uncertain terms. So I was slow on the pickup? > And apparently you *still* do not realize that the reason *why* your code > did not work *has been told to you* by the browser’s script console had you > looked at it (F12). > > Because it *certainly* said something along the lines of > > | window.frames is *not a function*. > ^^^^^^^^^^^^^^ Ok, the typo was in the code in the post and not in the code I was testing. Still it would've been nice if you'd told me that while window.frames['frm'].contentWindow.postMessage won't work, that window.frames['frm'].postMessage would. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-12-13 17:31 +0100 |
| Message-ID | <10781837-870a-d793-e7ce-168c96d6f01c@PointedEars.de> |
| In reply to | #35890 |
Andrew Poulos wrote: > Ok, the typo was in the code in the post and not in the code I was testing. ACK. > Still it would've been nice if you'd told me that while > window.frames['frm'].contentWindow.postMessage > won't work, that > window.frames['frm'].postMessage > would. 1. This is not a support forum, where you can be lazy, make demands, and have a right to get what you demand. 2. IIRC I have never come across this problem before. (I have not double-checked your claim yet.) -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Mark-" <nospam@mapson.xyz> |
|---|---|
| Date | 2018-12-13 17:33 +0000 |
| Message-ID | <puu54h$pr8$1@gioia.aioe.org> |
| In reply to | #35891 |
Thomas 'PointedEars' Lahn wrote: > 1. ...make demands, and have a right to get what you demand. HA, pot calling the kettle black.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-12-13 19:19 +0100 |
| Message-ID | <XnsA9B7C488972D3eejj99@194.109.6.166> |
| In reply to | #35892 |
"Mark-" <nospam@mapson.xyz> wrote on 13 Dec 2018 in comp.lang.javascript: > Thomas 'PointedEars' Lahn wrote: > >> 1. ...make demands, and have a right to get what you demand. > > HA, pot calling the kettle black. Nonsense, I think Pointy is right, he is not doing the same. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Mark-" <nospam@mapson.xyz> |
|---|---|
| Date | 2018-12-13 20:27 +0000 |
| Message-ID | <puufbg$4ei$1@gioia.aioe.org> |
| In reply to | #35894 |
Evertjan. wrote: > Nonsense, > I think Pointy is right, > he is not doing the same. You must have a short memory.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-12-13 19:17 +0100 |
| Message-ID | <XnsA9B7C42B0FEA5eejj99@194.109.6.166> |
| In reply to | #35890 |
Andrew Poulos <ap_prog@hotmail.com> wrote on 11 Dec 2018 in comp.lang.javascript: > Still it would've been nice It would be nice if Brexit was not imminent, but then agin, you most probably are not Mrs May in disguise. > if you'd told me that while > window.frames['frm'].contentWindow.postMessage > won't work, that > window.frames['frm'].postMessage > would. Both[!!!] don't work, I suspect, as window.frames being a collection, its [..] would expect to be evaluated to an integer numberic value. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2018-12-14 07:56 +1100 |
| Message-ID | <IpqdnQg9VI8WWo_BnZ2dnUU7-KfNnZ2d@westnet.com.au> |
| In reply to | #35893 |
On 14/12/2018 5:17 am, Evertjan. wrote: > Andrew Poulos <ap_prog@hotmail.com> wrote on 11 Dec 2018 in > comp.lang.javascript: >> if you'd told me that while >> window.frames['frm'].contentWindow.postMessage >> won't work, that >> window.frames['frm'].postMessage >> would. > > Both[!!!] don't work, I suspect, > as window.frames being a collection, > its [..] would expect to be evaluated > to an integer numberic value. I just tested it again and window.frames['frm'].postMessage... works for me. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-12-13 22:44 +0100 |
| Message-ID | <525bd638-6fd5-161a-1023-cfef2b15ce27@PointedEars.de> |
| In reply to | #35896 |
Andrew Poulos wrote:
> On 14/12/2018 5:17 am, Evertjan. wrote:
>> Andrew Poulos <ap_prog@hotmail.com> wrote on 11 Dec 2018 in
>> comp.lang.javascript:
>>> if you'd told me that while
>>> window.frames['frm'].contentWindow.postMessage
>>> won't work, that
>>> window.frames['frm'].postMessage
>>> would.
>>
>> Both[!!!] don't work, I suspect,
>> as window.frames being a collection,
>> its [..] would expect to be evaluated
>> to an integer numberic value.
Utter nonsense. It is *the defining* property* of a (HTML)Collection (by
contrast to an Array) that it cannot be indexed *only* using numbers:
| > window.frames[3].name
| < "ufpdb_category_header"
|
| > window.frames[window.frames[3].name] === window.frames[3]
| < true
<https://www.w3.org/TR/2015/REC-dom-20151119/#htmlcollection>
> I just tested it again and window.frames['frm'].postMessage... works for me.
Turns out that .contentWindow and .contentDocument → .contentWindow.document
are properties of (i)frame *element* objects only.
That is, *again*, *“doesn’t work” is NOT a problem description*. In the
Console tab/pane of the Chrome Dev Tools (in navigator.userAgent ==
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/57.0.2987.98 Safari/537.36"):
| > window.frames[0]
| < Window {stop: function, open: function, alert: function, confirm:
| function, prompt: function…}
|
| > window.frames[0].contentWindow.postMessage(/* … */);
| (x) Uncaught TypeError: Cannot read property 'postMessage' of undefined
| at <anonymous>:1:31
|
| > window.frames[0].contentWindow
| < undefined
By contrast:
| > document.getElementsByTagName("frame")[0].contentWindow
| < Window {stop: function, open: function, alert: function, confirm:
| function, prompt: function…}
|
| > document.getElementsByTagName("frame")[0].contentWindow.postMessage
| < function () { [native code] }
| > document.getElementsByTagName("iframe")[0].contentWindow.postMessage
| < function () { [native code] }
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2018-12-14 09:21 +1100 |
| Message-ID | <EeudnfxDsaP0Ro_BnZ2dnUU7-a3NnZ2d@westnet.com.au> |
| In reply to | #35897 |
On 14/12/2018 8:44 am, Thomas 'PointedEars' Lahn wrote:
> Andrew Poulos wrote:
>> On 14/12/2018 5:17 am, Evertjan. wrote:
>>> Andrew Poulos <ap_prog@hotmail.com> wrote on 11 Dec 2018 in
>>> comp.lang.javascript:
>>>> if you'd told me that while
>>>> window.frames['frm'].contentWindow.postMessage
>>>> won't work, that
>>>> window.frames['frm'].postMessage
>>>> would.
>>>
>>> Both[!!!] don't work, I suspect,
>>> as window.frames being a collection,
>>> its [..] would expect to be evaluated
>>> to an integer numberic value.
>
> Utter nonsense. It is *the defining* property* of a (HTML)Collection (by
> contrast to an Array) that it cannot be indexed *only* using numbers:
>
> | > window.frames[3].name
> | < "ufpdb_category_header"
> |
> | > window.frames[window.frames[3].name] === window.frames[3]
> | < true
>
> <https://www.w3.org/TR/2015/REC-dom-20151119/#htmlcollection>
>
>> I just tested it again and window.frames['frm'].postMessage... works for me.
>
> Turns out that .contentWindow and .contentDocument → .contentWindow.document
> are properties of (i)frame *element* objects only.
>
> That is, *again*, *“doesn’t work” is NOT a problem description*. In the
> Console tab/pane of the Chrome Dev Tools (in navigator.userAgent ==
> "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/57.0.2987.98 Safari/537.36"):
>
> | > window.frames[0]
> | < Window {stop: function, open: function, alert: function, confirm:
> | function, prompt: function…}
> |
> | > window.frames[0].contentWindow.postMessage(/* … */);
> | (x) Uncaught TypeError: Cannot read property 'postMessage' of undefined
> | at <anonymous>:1:31
> |
> | > window.frames[0].contentWindow
> | < undefined
and
console.log( window.frames[0].postMessage );
returns this: ƒ () { [native code] }
Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-12-14 01:08 +0100 |
| Message-ID | <59248fcd-8c5e-b8f2-d2e4-d0f98727cdc3@PointedEars.de> |
| In reply to | #35898 |
Andrew Poulos wrote:
> On 14/12/2018 8:44 am, Thomas 'PointedEars' Lahn wrote:
>> Turns out that .contentWindow and .contentDocument → .contentWindow.document
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> are properties of (i)frame *element* objects only.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> That is, *again*, *“doesn’t work” is NOT a problem description*. In the
>> Console tab/pane of the Chrome Dev Tools (in navigator.userAgent ==
>> "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/57.0.2987.98 Safari/537.36"):
>>
>> | > window.frames[0]
>> | < Window {stop: function, open: function, alert: function, confirm:
>> | function, prompt: function…}
>> |
>> | > window.frames[0].contentWindow.postMessage(/* … */);
>> | (x) Uncaught TypeError: Cannot read property 'postMessage' of undefined
>> | at <anonymous>:1:31
>> |
>> | > window.frames[0].contentWindow
>> | < undefined
>
> and
>
> console.log( window.frames[0].postMessage );
> returns this: ƒ () { [native code] }
Yes. You really need to learn how to read comprehensively.
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2018-12-14 12:54 +1100 |
| Message-ID | <vdKdnZ2CiI-ikI7BnZ2dnUU7-LfNnZ2d@westnet.com.au> |
| In reply to | #35899 |
On 14/12/2018 11:08 am, Thomas 'PointedEars' Lahn wrote:
> Andrew Poulos wrote:
>> On 14/12/2018 8:44 am, Thomas 'PointedEars' Lahn wrote:
>>> Turns out that .contentWindow and .contentDocument → .contentWindow.document
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> are properties of (i)frame *element* objects only.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> That is, *again*, *“doesn’t work” is NOT a problem description*. In the
>>> Console tab/pane of the Chrome Dev Tools (in navigator.userAgent ==
>>> "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
>>> Chrome/57.0.2987.98 Safari/537.36"):
>>>
>>> | > window.frames[0]
>>> | < Window {stop: function, open: function, alert: function, confirm:
>>> | function, prompt: function…}
>>> |
>>> | > window.frames[0].contentWindow.postMessage(/* … */);
>>> | (x) Uncaught TypeError: Cannot read property 'postMessage' of undefined
>>> | at <anonymous>:1:31
>>> |
>>> | > window.frames[0].contentWindow
>>> | < undefined
>>
>> and
>>
>> console.log( window.frames[0].postMessage );
>> returns this: ƒ () { [native code] }
>
> Yes. You really need to learn how to read comprehensively.
I was making sure(r) that others wouldn't make same the mistake I did.
Funny that if I can't read properly you write to ask me to learn to read
properly ;-)
Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-12-14 16:04 +0100 |
| Message-ID | <a1cba269-a525-7d8c-e81d-34c02f9406b8@PointedEars.de> |
| In reply to | #35900 |
Andrew Poulos wrote:
> On 14/12/2018 11:08 am, Thomas 'PointedEars' Lahn wrote:
>> Andrew Poulos wrote:
>>> console.log( window.frames[0].postMessage );
>>> returns this: ƒ () { [native code] }
>>
>> Yes. You really need to learn how to read comprehensively.
>
> I was making sure(r) that others wouldn't make same the mistake I did.
>
> Funny that if I can't read properly you write to ask me to learn to read
> properly ;-)
ISTM that you are not realizing your *actual* mistake(s) because you are
not reading carefully enough.
To begin with, window.frames[…] and
document.getElementById('…').contentWindow do NOT refer to the same (type
of) object, and window.frames[…].contentWindow is always “undefined”.
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2018-12-15 06:32 +1100 |
| Message-ID | <_NmdnVsQ3ePSmInBnZ2dnUU7-YHNnZ2d@westnet.com.au> |
| In reply to | #35901 |
On 15/12/2018 2:04 am, Thomas 'PointedEars' Lahn wrote:
> To begin with, window.frames[…] and
> document.getElementById('…').contentWindow do NOT refer to the same (type
> of) object, and window.frames[…].contentWindow is always “undefined”.
Which I'm pretty s sure that no one here knew that a week ago.
Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-12-15 01:11 +0100 |
| Message-ID | <f9a3a4af-1426-9c92-c11c-d388794b3048@PointedEars.de> |
| In reply to | #35902 |
Andrew Poulos wrote:
> On 15/12/2018 2:04 am, Thomas 'PointedEars' Lahn wrote:
>> To begin with, window.frames[…] and
>> document.getElementById('…').contentWindow do NOT refer to the same (type
>> of) object, and window.frames[…].contentWindow is always “undefined”.
>
> Which I'm pretty s sure that no one here knew that a week ago.
Sarcasm, I hope.
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.javascript
csiph-web