473,785 Members | 2,767 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JAVAS CRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
myWindow = window.open("", "tinyWindow ", 'toolbar,width= 150,height=100' )
myWindow.docume nt.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:80 80/cocoon/cuypers/oai/text?Content=Bi ography&width=6 78&height=60&du ration=84&fonts ize=6&fgcolor=% 23600000&bgcolo r=%23f6d42a&ext =.rt"
dur="84"/></par></body></smil>")
myWindow.docume nt.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 1765


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="JAVAS CRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
myWindow = window.open("", "tinyWindow ", 'toolbar,width= 150,height=100' )
myWindow.docume nt.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:80 80/cocoon/cuypers/oai/text?Content=Bi ography&width=6 78&height=60&du ration=84&fonts ize=6&fgcolor=% 23600000&bgcolo r=%23f6d42a&ext =.rt"
dur="84"/></par></body></smil>")
myWindow.docume nt.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
1187
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, but perhaps I am not searching correctly. Can anyone tell me how i can take the text contained in my xml document, and output it to a region of my smil presentation. As yet I have only been able to work out how to output text using a .txt file,...
1
2707
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 working, but it only worked for IE. You can see a working version here: http://www.publicpen.com/designer/mcControlPanel.php username: designer password: designer123 However, I've tried to rewrite this so it would work in all browsers,
1
1531
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 window. I wrote the whole preview function in javascript so that I don't have to reload the page to see a preview. Here is the code I wrote that doesn't work at all: Code:
136
9457
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 code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
2
1457
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 in Firefox. This is the example I prepared: http://www.metu.edu.tr/~ari/smil
2
3157
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 then the calender gone actually i want if i click outside off the calender then it should me removed ..How kan i do this ... Pls inform me as early as possible .. I am waiting for ur quick replay ...Here i attached the source code .... <!DOCTYPE...
0
1926
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
1755
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 to the smil program. As I find to make the attractive smil is not easy and I am looking to have some advice, if I can have a sample code which can be used. Thanks!
4
2716
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 code that calculates the total price, depending on number of units, currently what the code does is set the price like so - if qty 1 then £99+VAT if qty equall to or greater than 2 and equall to or less than 9 then price =
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8974
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.