Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > EMBED element - dynamically changing SRC attribute

Reply
Thread Tools

EMBED element - dynamically changing SRC attribute

 
 
Martin
Guest
Posts: n/a
 
      12-15-2003
Hi,

Does anyone know how to dynamically (client side) change the source for an
embedded object? I am offering a list with media files (mpg, wav) and I want
the file the user selects to be played in the embedded media player. What
happens is that only the initially set media file (in the SRC attribute of
the EMBED element) is played. Onwards it doesn't matter what I assign to the
SRC attribute, only the initial file will play.

I use the OnChange event of the SELECT element to trigger a function that
sets the SRC attribute of the EMBED element. This seems to work as an alert
shows but it doesn't reach the Media Player. Should I kick the EMBED element
somehow?

Martin.


 
Reply With Quote
 
 
 
 
Whitecrest
Guest
Posts: n/a
 
      12-16-2003
In article <3fde1995$0$43994$(E-Mail Removed)4all.nl >,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> Does anyone know how to dynamically (client side) change the source for an
> embedded object?....


Depends on the embedded object. If it is Microsoft Media player, then
you use javascript to change the Filename property. If autostart was
set to true, then it will change.

--
Whitecrest Entertainment
www.whitecrestent.com
 
Reply With Quote
 
 
 
 
Martin
Guest
Posts: n/a
 
      12-16-2003
> > Does anyone know how to dynamically (client side) change the source for
an
> > embedded object?....


> Depends on the embedded object. If it is Microsoft Media player, then
> you use javascript to change the Filename property. If autostart was
> set to true, then it will change.


It works. Pfew! That simple?! Thanks a lot, this was driving me nuts.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<txt src= ...> equivalent of <img src= ...> Steve Richter ASP .Net 3 02-09-2006 08:44 PM
Changing the src of an embed JavaScriptJon Javascript 1 12-04-2005 06:24 PM
changing xml src element DoomedLung Javascript 0 07-28-2005 07:47 PM
Javascript Changing SRC of EMBED Quicktime Peter Stickney Javascript 0 02-14-2005 03:45 AM
src.jar (src.zip) missing on Mac OSX Java 1.4.1 installation? Greg Johnson Java 4 09-18-2003 07:21 AM



Advertisments