This is the Jukebox...that I had been working on for a few months now. So here ya go
Code:
<center><br>
<title>TITLEHERE</title>
<script type="text/javascript" language="JavaScript">
/*Jukebox Coded By Funnyguy
You can find more at www.xwforum.com
*/
<!--
var isdhtml = ( document.getElementById || document.all || document.layers );
function getObj(name){
if(document.getElementById){
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
return document.getElementById(name);
}else if(document.all){
this.obj = document.all[name];
this.style = document.all[name].style;
return document.all[name];
}else if(document.layers){
this.obj = getObjNN4(document,name);
this.style = this.obj;
return getObjNN4(document,name);
}
}
function getObjNN4(obj,name){
var x = obj.layers;
var foundLayer;
for (var i=0;i<x.length;i++){
if (x[i].id == name)
foundLayer = x[i];
else if (x[i].layers.length)
var tmp = getObjNN4(x[i],name);
if (tmp) foundLayer = tmp;
}
return foundLayer;
}
function change() {
if(!isdhtml){
alert('sorry your browser does not support this script.');
}else{
x = new getObj('vid');
loc = document.myvid.vid_select.options[document.myvid.vid_select.selectedIndex].value;
x.innerHTML ='<embed src="'+loc+'" width="85" height="70" showstatusbar="1" autostart="true" loop="false"></embed>';
}
}
function change02() {
if(!isdhtml){
alert('sorry your browser does not support this script.');
}else{
x = new getObj('vid');
loc = document.myvid.vid_select.options[document.myvid.vid_select.selectedIndex].value;
x.innerHTML ='<embed src="'+loc+'" width="85" height="70" showstatusbar="1" autostart="false" loop="false" ></embed>';
}
}
-->
</script>
<body>
<form name="myvid">
<select name="vid_select">
<option value="LINKTOMP3">ARTISTNAME:SONGNAME</option>
<option value="LINKTOMP3">ARTISTNAME:SONGNAME</option>
<option value="LINKTOMP3">ARTISTNAME:SONGNAME</option>
<option value="LINKTOMP3">ARTISTNAME:SONGNAME</option>
<option value="LINKTOMP3">ARTISTNAME:SONGNAME</option>
<option value="LINKTOMP3">ARTISTNAME:SONGNAME</option>
</select>
<input type="button" value="play" onclick="change()" /><input type="button" value="stop" onclick="change02()" />
</form>
<div id="vid"></div></center>
If you want to add another song...
Code:
<option value="LINKTOMP3">ARTISTNAME:SONGNAME</option>
Now...if you want to add it as a NaviBar Link Do this:
AdminCp->New Forum->Choose the permission and stuff
Go to the Forum you just created->Click on the Rules->Put it as Show Link Only->Call it whatever you want->Put in the code
Go back to your forums->Click on that forum->Click on the rules sign->Grab that link
Go to board Wrappers->Find the Board Tag and post this...
Code:
<script>
/*
Adding NaviBar Links
By Webworldx
*/
var aLink=new Array()
aLink[0]='<img src="http://69.93.183.37/815/88/upload/p497627.gif" border="0" alt="" width="14" height="16" />&nbsp;<a href="COPYLINKHERE">Jukebox</a>'
var uCell = document.getElementsByTagName('TD')
for (i=0;i<uCell.length;i++){
if (uCell[i].align=="right" && uCell[i].innerHTML.match("act=calendar") && uCell[i].innerHTML.match("act=Help")){
var addLink=""
for (j=0;j<aLink.length;j++){
addLink+=aLink[j]+" &nbsp; &nbsp;&nbsp;"
}
uCell[i].innerHTML=addLink+uCell[i].innerHTML
}}
</script>
And thats it

Make sure that the songs are in mp3 format. Have fun
