EMBED element - dynamically changing SRC attribute

M

Martin

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.
 
W

Whitecrest

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.
 
M

Martin

Does anyone know how to dynamically (client side) change the source for
an
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.
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top