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


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

Loading a page into ID and also load script dynamically?

Started byJonas Thörnvall <jonas.thornvall@gmail.com>
First post2019-03-19 00:48 -0700
Last post2019-03-19 01:32 -0700
Articles 3 — 1 participant

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


Contents

  Loading a page into ID and also load script dynamically? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-19 00:48 -0700
    Re: Loading a page into ID and also load script dynamically? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-19 01:01 -0700
      Re: Loading a page into ID and also load script dynamically? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-19 01:32 -0700

#36130 — Loading a page into ID and also load script dynamically?

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2019-03-19 00:48 -0700
SubjectLoading a page into ID and also load script dynamically?
Message-ID<2a8730d3-c338-47df-92d2-bf44206176f9@googlegroups.com>
 function start_synth(){
//This will load the page dynamically into an ID
 document.getElementById("startTest").innerHTML='<object type="text/html" data="http://imaya.github.io/demo/sf2.js/wml.html" ></object>';


// The above code do load the page into an ID, but it does not actually start the // synth. This code do "but it also open a new window.

synth.Load('http://imaya.github.io/demo/sf2.js/wml.html')
}


How can i write the function so that both load the page into a div and also start the synth?

[toc] | [next] | [standalone]


#36131

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2019-03-19 01:01 -0700
Message-ID<d473cf47-7cf4-4d10-94fa-ed6f977aae81@googlegroups.com>
In reply to#36130
Den tisdag 19 mars 2019 kl. 08:48:46 UTC+1 skrev Jonas Thörnvall:
> function start_synth(){
> //This will load the page dynamically into an ID
>  document.getElementById("startTest").innerHTML='<object type="text/html" data="http://imaya.github.io/demo/sf2.js/wml.html" ></object>';
> 
> 
> // The above code do load the page into an ID, but it does not actually start the // synth. This code do "but it also open a new window.
> 
> synth.Load('http://imaya.github.io/demo/sf2.js/wml.html')
> }
> 
> 
> How can i write the function so that both load the page into a div and also start the synth?
<html>
<head>


<script type="text/javascript">
    function Synth() {
        this.sy = null;
        this.Load = function(url) {
        this.sy = window.open(url, "testing", "width=900,height=670,scrollbars=yes,resizable=yes");
        }
    }
    var synth = new Synth();

function start_synth(){
//document.getElementById("testing").innerHTML='<object type="text/html" data="http://imaya.github.io/demo/sf2.js/wml.html" ></object>';
synth.Load('http://imaya.github.io/demo/sf2.js/wml.html');
}
</script>
</head>
<body bgcolor=grey onload="start_synth()">
<div id=testing>

</div> 
</body>
</html>

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


#36132

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2019-03-19 01:32 -0700
Message-ID<4798b0ee-6ba3-43d0-8cc9-a4d6942cdf28@googlegroups.com>
In reply to#36131
Den tisdag 19 mars 2019 kl. 09:01:19 UTC+1 skrev Jonas Thörnvall:
> Den tisdag 19 mars 2019 kl. 08:48:46 UTC+1 skrev Jonas Thörnvall:
> > function start_synth(){
> > //This will load the page dynamically into an ID
> >  document.getElementById("startTest").innerHTML='<object type="text/html" data="http://imaya.github.io/demo/sf2.js/wml.html" ></object>';
> > 
> > 
> > // The above code do load the page into an ID, but it does not actually start the // synth. This code do "but it also open a new window.
> > 
> > synth.Load('http://imaya.github.io/demo/sf2.js/wml.html')
> > }
> > 
> > 
> > How can i write the function so that both load the page into a div and also start the synth?
> <html>
> <head>
> 
> 
> <script type="text/javascript">
>     function Synth() {
>         this.sy = null;
>         this.Load = function(url) {
>         this.sy = window.open(url, "testing", "width=900,height=670,scrollbars=yes,resizable=yes");
>         }
>     }
>     var synth = new Synth();
> 
> function start_synth(){
> //document.getElementById("testing").innerHTML='<object type="text/html" data="http://imaya.github.io/demo/sf2.js/wml.html" ></object>';
> synth.Load('http://imaya.github.io/demo/sf2.js/wml.html');
> }
> </script>
> </head>
> <body bgcolor=grey onload="start_synth()">
> <div id=testing>
> 
> </div> 
> </body>
> </html>

maybe windows.open  is only possible to ID using frames?

[toc] | [prev] | [standalone]


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


csiph-web