function Mscale() {
document.getElementById("scale").src=scales[0]
}
function Hmscale() {
document.getElementById("scale").src=scales[1]
}
function Nmscale() {
document.getElementById("scale").src=scales[2]
}
function Mmscale() {
document.getElementById("scale").src=scales[3]
}
function Chrscale() {
document.getElementById("scale").src=scales[4]
}
Do you get any error messages?
What browser(s) did you try with.
Dunno if it is a typo when you pasted the code, but your second example has double-quotes within a double-quoted string, which is a mistake - either use single-quotes for one set, or else backslash-escape the internal set.
No I'm not looking for a playlist, just some way to have one embedded element for which the source changes by clicking different links. I can't figure out why the code above didn't work so any suggestions would be welcome. THe sound files aren't songs, just short sound clips.
A song is also a sound clip, whether it is short or long.
You probably need to do this in HTML5 with the audio element. Then, I guess you need some scripting so that onclick, the current song stops playing, the src"" (or <source>) will be changed and then trigger the play() method agiain.
Bookmarks