I have a list of music that I organized into a styled list and when you select one of those items it resubmits the .innerhtml flash object with the new content. I need a way to change the select ones ID to "selected" or something similar, which sounds easy.
But then I would also need to find out which ID was selected (How do you get an element's id within a function without passing something in as a parameters?).
And then I need to null the ID after another <li> is selected... Unless its done automatically since ID's are supposed to be exclusive, right?
Heres part of the list, minus the styles attached to it, with the JS I'm using, minus the flash code.
PHP Code:
<ul id="Musiclist"> <li> <a onclick="changeLink('cncmusic/files/in%20deep.mp3')">In Deep</a> <li> <a onclick="changeLink('cncmusic/files/hell%20march.mp3')">Hell March</a> </ul>
<script type="text/javascript"> var source="<object ..."; function changeLink(targetsrc) { srcc = document.getElementById('player').src; start = srcc.search("id="); ...set some variables and swap the player } </script>
The code works fine right now, but the flash player I'm using doesn't show the title of the track being played for these files for some reason, so I need a way to show whats being played and would like to show that with a selection box around the <li>.
|