inherit
16846
0
Nov 19, 2012 15:20:20 GMT -8
Chris
3,036
December 2003
cddude
|
Post by Chris on Oct 6, 2006 19:09:32 GMT -8
<script type="text/Javascript"> // Popup Music Player by Chris // Do not redistribute without permission of the creator
var songs = []; songs.push(["SONG URL","SONG NAME"]); songs.push(["SONG URL","SONG NAME"]); songs.push(["SONG URL","SONG NAME"]);
// DONT EDIT document.write("<a href='javascript:launchPlayer();void(0);'>Launch Music Player</a>");
function launchPlayer(){ var x = window.open(); var y = "<html><head><title>Music Player</title></head><body>"; y += "<script> function changeM(x){ var z = x.options[x.selectedIndex].value; if(!z) return false; document.body.innerHTML = \"<embed src='\"+z+\"' autostart='true' loop='true' playcount='9999' type='audio/mpeg' />\"; }<\/script>"; y += "<select onchange='changeM(this);' onkeyup='changeM(this);'><option>Select Song</option>"; for(var a=0;a<songs.length;a++) y += "<option value='"+songs[a][0]+"'>"+songs[a][1]+"</option>"; y += "</select><br><br>"; y += "</body></html>"; x.document.write(y); } </script>
This was requested was too often, so I decided to just make it. -_-
Put it where you want the link to open the popup to appear. The editing should be self explanatory and everything.
Enjoy.
|
|