Javascript generating SMIL document

S

Stefano Bocconi

Hi all,

I am trying to use javascript to generate a SMIL document to give as
input to the browser (in another window or in the same). I tried this:

<HTML>
<HEAD>
<TITLE>My First JavaScript</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
myWindow = window.open("", "tinyWindow", 'toolbar,width=150,height=100')
myWindow.document.write("<smil><head><layout><root-layout width="678"
height="624" background-color="#fcf4e5"/><region id="title-region"
left="0" top="0" width="678" height="60"
fit="meet"/></layout></head><body><par><text id="title"
region="title-region" begin="0"
src="http://media.cwi.nl:8080/cocoon/cuy...ize=6&fgcolor=#600000&bgcolor=#f6d42a&ext=.rt"
dur="84"/></par></body></smil>")
myWindow.document.close()
//-->
</SCRIPT>
</BODY>
</HTML>

but it does not work. I had a look at some FAQ but I could not find
anything. Now I am doubting that Javascript can only generate HTML
documents. Any clue?

Thanks,

Stefano
 
M

Martin Honnen

Stefano said:
I am trying to use javascript to generate a SMIL document to give as
input to the browser (in another window or in the same). I tried this:

<HTML>
<HEAD>
<TITLE>My First JavaScript</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
myWindow = window.open("", "tinyWindow", 'toolbar,width=150,height=100')
myWindow.document.write("<smil><head><layout><root-layout width="678"
height="624" background-color="#fcf4e5"/><region id="title-region"
left="0" top="0" width="678" height="60"
fit="meet"/></layout></head><body><par><text id="title"
region="title-region" begin="0"
src="http://media.cwi.nl:8080/cocoon/cuy...ize=6&fgcolor=#600000&bgcolor=#f6d42a&ext=.rt"
dur="84"/></par></body></smil>")
myWindow.document.close()
//-->
</SCRIPT>
</BODY>
</HTML>

but it does not work. I had a look at some FAQ but I could not find
anything. Now I am doubting that Javascript can only generate HTML
documents. Any clue?

Yes, current browser pretty much only allow to document.write text/html
content.
If it is NN4 and you have a plugin set up for smil content then
myWin.document.open('put smil content type here');
myWin.document.write('<smil>...</smil>');
myWin.document.close()
should do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top