M
Mateusz Viste
Hi,
I am trying make some multimedia files playable from my website. So far, I
am able to generate dynamically a new page containing the right <embed>
section. However, when I load my script, it overwrites the current page. Is
there any way I could load a new tab or window, and put the new content
into it?
Here is the script I am using right now:
<script language="JavaScript"><!--
function playmedia() {
newwindow=window.open();
if (window.focus) {newwindow.focus()}
document.write('<html>')
document.write(' <head>')
document.write(' <title>Media player</title>')
document.write(' </head>')
document.write(' <body bgcolor="#A0A0FF" text="#000000">')
document.write(' <center>')
document.write(' <h2>Playing the media file... ♫</h2><br>')
document.write(' <!-- show play buttons, autostart and loop once -->')
document.write(' <embed src="title.mid" hidden=false autostart=true
loop=1 autosize=1>')
document.write(' </center>')
document.write(' </body>')
document.write('</html>')
}
//--></script>
Any ideas?
Best regards,
Mateusz Viste
I am trying make some multimedia files playable from my website. So far, I
am able to generate dynamically a new page containing the right <embed>
section. However, when I load my script, it overwrites the current page. Is
there any way I could load a new tab or window, and put the new content
into it?
Here is the script I am using right now:
<script language="JavaScript"><!--
function playmedia() {
newwindow=window.open();
if (window.focus) {newwindow.focus()}
document.write('<html>')
document.write(' <head>')
document.write(' <title>Media player</title>')
document.write(' </head>')
document.write(' <body bgcolor="#A0A0FF" text="#000000">')
document.write(' <center>')
document.write(' <h2>Playing the media file... ♫</h2><br>')
document.write(' <!-- show play buttons, autostart and loop once -->')
document.write(' <embed src="title.mid" hidden=false autostart=true
loop=1 autosize=1>')
document.write(' </center>')
document.write(' </body>')
document.write('</html>')
}
//--></script>
Any ideas?
Best regards,
Mateusz Viste