A bit of background first. I have made a player based on soundManager2, in the HTML file of the player there is a link to the soundManager2 js file, a js file which creates my interface, and a php file which generates js code to create the playlist.
The reason the playlist is in an external file is so while the music is playing a user can add tracks to it. Then on the final track the player will reload itself using window.location.reload(); in order to recheck the external playlist to see if any tracks have been added, if they have it continues on and plays those, if not it loops back to the beginning.
I just tried to embed the music player into the web page it has been created for using the jQuery below:
$("body").ready(function(){
$("div").load("music_player.html", function() {
button_up();//Loads the first track of the playlist
});
});
As you may have guessed my problem is that window.location.reload(); reloads the whole page and not just the player in the div. So what I need to know is, is there a way to just reload the content of the div which I can call from the music players js file. Alternatively, is there a way to tell the music player to recheck the playlist file each time a track is finished (soundManager allows you to call functions at the end of a sound), and this would probably be the better solution.