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


Groups > comp.lang.javascript > #36141 > unrolled thread

Tell when external http resource loaded in frame.

Started byJonas Thörnvall <jonas.thornvall@gmail.com>
First post2019-03-22 00:54 -0700
Last post2019-03-23 08:52 -0700
Articles 10 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  Tell when external http resource loaded in frame. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-22 00:54 -0700
    Re: Tell when external http resource loaded in frame. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-22 09:31 +0100
      Re: Tell when external http resource loaded in frame. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-22 01:48 -0700
        Re: Tell when external http resource loaded in frame. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-22 10:05 +0100
          Re: Tell when external http resource loaded in frame. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-22 02:14 -0700
            Re: Tell when external http resource loaded in frame. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-22 10:20 +0100
              Re: Tell when external http resource loaded in frame. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-23 05:41 -0700
                Re: Tell when external http resource loaded in frame. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-23 14:20 +0100
          Re: Tell when external http resource loaded in frame. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-22 10:16 +0100
    Re: Tell when external http resource loaded in frame. Julio Di Egidio <julio@diegidio.name> - 2019-03-23 08:52 -0700

#36141 — Tell when external http resource loaded in frame.

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2019-03-22 00:54 -0700
SubjectTell when external http resource loaded in frame.
Message-ID<a223888d-e356-464c-92dc-0a4178ca4d51@googlegroups.com>
I load an external synth script into a frame using windows open method  to load that frame. ***AFTER*** it is loaded "take a while" i would like to update some settings in the synth frame.

But is there a way for document, my frame "javascript" HTML DOM to know when the other frame finished loading?

http://http://midisequenser.000webhostapp.com/?fbclid=IwAR0YYPYik261v1q_T8E-H1H0-KDNMwvZTFPLXIXzK3dJLxv9gh8TdC8vSRQ 

[toc] | [next] | [standalone]


#36142

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2019-03-22 09:31 +0100
Message-ID<XnsAA1A60F3AB2FBeejj99@194.109.6.166>
In reply to#36141
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 22
Mar 2019 in comp.lang.javascript: 

> I load an external synth script into a frame using windows open method 
> to load that frame. ***AFTER*** it is loaded "take a while" i would like
> to update some settings in the synth frame. 

If this Q is ment for others than yourself:
What the hell is a "synth frame"?
What the hell is a "synth script"?

> But is there a way for document, my frame "javascript" HTML DOM 

Is "document, my frame "javascript" HTML DOM" a document?
Where is that "document, my frame "javascript" HTML DOM"?

==========================

[All the above is not helpfull in your Q, methinks]

> to know
> when the other frame finished loading? 

If the othe frame is in the same domain, you can access the same, imho:

let window2 = window.open("", "window2_name");
// later:
alert( "Done?: " + window2.innerHTML.length > 27 );
// [not tested]
 
> http://http://midisequenser.000webhostapp.com/?fbclid=IwAR0YYPYik261v1q_T
> 8E-H1H0-KDNMwvZTFPLXIXzK3dJLxv9gh8TdC8vSRQ 

No, I am not going to look there. 
-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#36143

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2019-03-22 01:48 -0700
Message-ID<ea91d6e7-240d-4597-8fa6-10e53130240b@googlegroups.com>
In reply to#36142
Den fredag 22 mars 2019 kl. 09:31:55 UTC+1 skrev Evertjan.:
> =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 22
> Mar 2019 in comp.lang.javascript: 
> 
> > I load an external synth script into a frame using windows open method 
> > to load that frame. ***AFTER*** it is loaded "take a while" i would like
> > to update some settings in the synth frame. 
> 
> If this Q is ment for others than yourself:
> What the hell is a "synth frame"?
> What the hell is a "synth script"?
> 
> > But is there a way for document, my frame "javascript" HTML DOM 
> 
> Is "document, my frame "javascript" HTML DOM" a document?
> Where is that "document, my frame "javascript" HTML DOM"?
> 
> ==========================
> 
> [All the above is not helpfull in your Q, methinks]
> 
> > to know
> > when the other frame finished loading? 
> 
> If the othe frame is in the same domain, you can access the same, imho:
> 
> let window2 = window.open("", "window2_name");
> // later:
> alert( "Done?: " + window2.innerHTML.length > 27 );
> // [not tested]
>  
> > http://http://midisequenser.000webhostapp.com/?fbclid=IwAR0YYPYik261v1q_T
> > 8E-H1H0-KDNMwvZTFPLXIXzK3dJLxv9gh8TdC8vSRQ 
> 
> No, I am not going to look there. 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

<frameset cols="10%,90%" >
<frame src="" name="extSFsynth">
<frame src="sequenser.html" name="sequenser">
</frameset>

//How can i figure out when this stopped to load.
synth.Load('https://logue.github.io/smfplayer.js/wml2.html');

 function Synth() {
        this.sy = null;
        this.Load = function(url) {
        this.sy = window.open(url, "extSFsynth", "width=700,height=700,scrollbars=yes,resizable=yes");
        }
}

[toc] | [prev] | [next] | [standalone]


#36144

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2019-03-22 10:05 +0100
Message-ID<XnsAA1A6694467CBeejj99@194.109.6.166>
In reply to#36143
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 22
Mar 2019 in comp.lang.javascript: 

> <frameset cols="10%,90%" >
> <frame src="" name="extSFsynth">
> <frame src="sequenser.html" name="sequenser">
> </frameset>
> 
> //How can i figure out when this stopped to load.
> synth.Load('https://logue.github.io/smfplayer.js/wml2.html');
> 
>  function Synth() {
>         this.sy = null;
>         this.Load = function(url) {
>         this.sy = window.open(url, "extSFsynth",
>         "width=700,height=700,scrollbars=yes,resizable=yes"); 
>         }
>}

It could send a message back if on common domain:

body.onload = "sendmessage()"; 



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#36145

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2019-03-22 02:14 -0700
Message-ID<92b3c714-88b6-4429-82f6-e1ccbfedb536@googlegroups.com>
In reply to#36144
Den fredag 22 mars 2019 kl. 10:05:28 UTC+1 skrev Evertjan.:
> =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 22
> Mar 2019 in comp.lang.javascript: 
> 
> > <frameset cols="10%,90%" >
> > <frame src="" name="extSFsynth">
> > <frame src="sequenser.html" name="sequenser">
> > </frameset>
> > 
> > //How can i figure out when this stopped to load.
> > synth.Load('https://logue.github.io/smfplayer.js/wml2.html');
> > 
> >  function Synth() {
> >         this.sy = null;
> >         this.Load = function(url) {
> >         this.sy = window.open(url, "extSFsynth",
> >         "width=700,height=700,scrollbars=yes,resizable=yes"); 
> >         }
> >}
> 
> It could send a message back if on common domain:
> 
> body.onload = "sendmessage()"; 
> 
> 
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

I guess i do a setTimeout.

[toc] | [prev] | [next] | [standalone]


#36147

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2019-03-22 10:20 +0100
Message-ID<XnsAA1A69377E8C1eejj99@194.109.6.166>
In reply to#36145
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 22 Mar 
2019 in comp.lang.javascript:

>> It could send a message back if on common domain:
>> 
>> body.onload = "sendmessage()"; 

> I guess i do a setTimeout.

Or you could go fishing. 
I mean, you are not communicating, just thinking out loud.

====================

Modern javascript has all kinds of waiting-for-response mechanisms.

<https://medium.com/codebuddies/getting-to-know-asynchronous-javascript-
callbacks-promises-and-async-await-17e0673281ee>


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#36148

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2019-03-23 05:41 -0700
Message-ID<b315625e-8981-4faf-a043-6d9505e6bde3@googlegroups.com>
In reply to#36147
Den fredag 22 mars 2019 kl. 10:20:54 UTC+1 skrev Evertjan.:
> =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 22 Mar 
> 2019 in comp.lang.javascript:
> 
> >> It could send a message back if on common domain:
> >> 
> >> body.onload = "sendmessage()"; 
> 
> > I guess i do a setTimeout.
> 
> Or you could go fishing. 
> I mean, you are not communicating, just thinking out loud.
> 
> ====================
> 
> Modern javascript has all kinds of waiting-for-response mechanisms.
Yeah maybe that is the problem....

> 
> <https://medium.com/codebuddies/getting-to-know-asynchronous-javascript-
> callbacks-promises-and-async-await-17e0673281ee>
> 
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#36149

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2019-03-23 14:20 +0100
Message-ID<XnsAA1B91E1AD088eejj99@194.109.6.166>
In reply to#36148
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 23
Mar 2019 in comp.lang.javascript: 

> Den fredag 22 mars 2019 kl. 10:20:54 UTC+1 skrev Evertjan.:
>> =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on
>> 22 Mar 2019 in comp.lang.javascript:
>> 
>> >> It could send a message back if on common domain:
>> >> 
>> >> body.onload = "sendmessage()"; 
>> 
>> > I guess i do a setTimeout.
>> 
>> Or you could go fishing. 
>> I mean, you are not communicating, just thinking out loud.
>> 
>> ====================
>> 
>> Modern javascript has all kinds of waiting-for-response mechanisms.

> Yeah maybe that is the problem....
 
Are you saying:

"I cannot get to town, because there are ten ways to get there?"

 
>> <https://medium.com/codebuddies/getting-to-know-asynchronous-javascript-
>> callbacks-promises-and-async-await-17e0673281ee>
>> 
>> 
>> -- 
>> Evertjan.
>> The Netherlands.
>> (Please change the x'es to dots in my emailaddress)
> 
> 



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#36146

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2019-03-22 10:16 +0100
Message-ID<XnsAA1A6874748EBeejj99@194.109.6.166>
In reply to#36144
"Evertjan." <exxjxw.hannivoort@inter.nl.net> wrote on 22 Mar 2019 in 
comp.lang.javascript:

> =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 22
> Mar 2019 in comp.lang.javascript: 
> 
>> <frameset cols="10%,90%" >
>> <frame src="" name="extSFsynth">
>> <frame src="sequenser.html" name="sequenser">
>> </frameset>
>> 
>> //How can i figure out when this stopped to load.
>> synth.Load('https://logue.github.io/smfplayer.js/wml2.html');
>> 
>>  function Synth() {
>>         this.sy = null;
>>         this.Load = function(url) {
>>         this.sy = window.open(url, "extSFsynth",
>>         "width=700,height=700,scrollbars=yes,resizable=yes"); 
>>         }
>>}
> 
> It could send a message back if on common domain:
> 
> body.onload = "sendmessage()"; 

<https://javascript.info/cross-window-communication>

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#36150

FromJulio Di Egidio <julio@diegidio.name>
Date2019-03-23 08:52 -0700
Message-ID<a6f06e33-8e22-409f-8e94-fe3cb1cd72c5@googlegroups.com>
In reply to#36141
On Friday, 22 March 2019 08:54:36 UTC+1, Jonas Thörnvall  wrote:

> But is there a way for document, my frame "javascript" HTML DOM to know
> when the other frame finished loading?

You can use the load event of iframe, as in:

  <iframe ... onload="alert(1)"></iframe>

HTH,

Julio

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web