473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Javascript generating SMIL document

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/cuypers/oai/text?Content=Biography&width=678&height=60&duratio n=84&fontsize=6&fgcolor=%23600000&bgcolor=%23f6d42 a&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

--
Stefano Bocconi (St*************@cwi.nl) http://www.cwi.nl/~sbocconi
Multimedia and Human-Computer Interaction
CWI (www.cwi.nl), Kruislaan 413, 1098 SJ Amsterdam, The Netherlands Tel: +31 20 592 4202 Fax: +31 20 592 4312

Jul 20 '05 #1
1 1754


Stefano Bocconi wrote:
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/cuypers/oai/text?Content=Biography&width=678&height=60&duratio n=84&fontsize=6&fgcolor=%23600000&bgcolor=%23f6d42 a&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.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sb1 | last post by:
Hi I am new to both xsl and smil, but I am attempting to create a smil presentation bases on an xml document, using xsl. I have searched on google to see if i can find the answer to this problem,...
1
by: lawrence | last post by:
This PHP function prints out a bunch of Javascript (as you can see). This is all part of the open source weblog software of PDS (www.publicdomainsoftware.org). We had this javascript stuff...
1
by: Jarrod Hyder | last post by:
Ok, I wrote my own weblog and I'm working on the web interface for adding/editing my posts. I decided to add a little preview button...when the button is clicked it is suppose to open a pop-up...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
2
by: fatihari | last post by:
Hi, I'm interested in synchronizing video with powerpoint slides.I have a problem with Firefox coz javascript code I used for controlling the video(seeking the video to a position) does not work...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
0
by: =?Utf-8?B?YmVydHB1?= | last post by:
Hi, I'm a beginner of smil. I found if I wrote it in this way: <smil> <head /> <body> <seq> <img src="image1.jpg" /> <img src="image2.jpg" />
0
by: Fred Ho | last post by:
I have a question which is actually some how I believe related to the xml topics.. I need to make a SMIL program to introduce the local tourist, I have some pictures and a mp3 file already to add...
4
by: =?Utf-8?B?R1ROMTcwNzc3?= | last post by:
Hi Guys, thanks for your help yesterday, I've got one more question, then I think I'm done for now,... Is it possible to insert recordset data in a javascript, for instance I have a javascript...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.