Can someone tell me why this is not working:
<a href="#" onclick="play('playlist1');">Play Playlist1</a>
function play(id){
myPlaylist.setPlaylist(id);
}
And this is working:
<a href="#" onclick="play();">Play Playlist1</a>
function play(){
myPlaylist.setPlaylist(playlist1);
}
There is also a variable called playlist1
var playlist1 = [
{
title:"Title",
artist:"artist",
mp3: "pathtofile"
}];
So i need the first one to set the variable to get the right playlist.
It is the same value so it really weird, but i need the first one to work
Can someone help me?
playlist1is a string, in the second a variable.var playlistthe input for the functiononclick="play('playlist1');"? Is that what you are asking for?