PDA

View Full Version : Please Help: Embedded Audio - same window



muwahid
09-16-2005, 11:37 PM
Hi all,

I need help , please!!

I have a php script that generates an listing of all my audio files. This is for online streaming and downloads.

The listing works and it displays the filename , date and last modified.
Visitors then have and option to either download or play .

Both options are working but I want to streamline the play option so that instead of opening a new window it must activitate an embedded player at the bottom of the listing so as to emulate a jukebox.

I already have the variables defined for the topic selection : $topic . So this part is sorted out. The only thing I need is for javascript to then pass that variable to an embedded player , in the same document. Get that.

Can javascript do this ? Any ideas?

jscheuer1
09-17-2005, 03:27 AM
I'm short on PHP and embedded sounds but, if the embedded player has an attribute or parameter that needs to be set javascript can probably do it. Something like:

document.getElementById('idOfEmbedCodeGoesHere').nameOfParameterToSet=$topicThe colored parts need to be replaced with the actual names used on the page. To assign an id to the embed code do like:

<embed id="player">

muwahid
09-17-2005, 02:35 PM
Thanks for your quick reply, I haven't tried that yet and will let you know if it works.

In the meantime, keep those solutions rolling in.