Previous Thread
Next Thread
Print Thread
Rate Thread
#183998 01/04/2005 1:29 PM
Joined: Jun 2001
Posts: 729
Coder
Coder
Offline
Joined: Jun 2001
Posts: 729
Sorry I miss read the inital post on wanting it based on the day of week frown Try this...

Change each document.write line's src= portion for the different songs you wish to play and their location. Also if you want the audio file to play "loop" change to true.

Code
<body>

<script language="JavaScript" type="text/javascript">

s_date = new Date();

if(s_date.getDay() == 1){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile1.mp3">');
}

if(s_date.getDay() == 2){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile2.mp3">');
}

if(s_date.getDay() == 3){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile3.mp3">');
}

if(s_date.getDay() == 4){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile4.mp3">');
}

if(s_date.getDay() == 5){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile5.mp3">');
}

if(s_date.getDay() == 6){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile6.mp3">');
}

if(s_date.getDay() == 7){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile7.mp3">');
}

if(s_date.getDay() == 0){
document.write('<embed width=0 height=0 hidden="true" autostart="true" volume="5" loop="false" src="AudioFile0.mp3">');
}
</script>

Sponsored Links
Entire Thread
Subject Posted By Posted
music changer Felix 10 12/30/2004 6:26 AM
Re: music changer Ian Spence 12/30/2004 7:13 AM
Re: music changer Felix 10 12/30/2004 5:46 PM
Re: music changer 1QuickSI 12/30/2004 7:39 PM
Re: music changer Felix 10 12/31/2004 3:59 AM
Re: music changer 1QuickSI 12/31/2004 11:04 PM
Re: music changer Felix 10 01/01/2005 8:46 PM
Re: music changer LK 01/01/2005 11:19 PM
Re: music changer Felix 10 01/02/2005 9:17 AM
Re: music changer 1QuickSI 01/04/2005 8:29 PM
Re: music changer Felix 10 01/05/2005 8:51 AM
Re: music changer 1QuickSI 01/05/2005 7:08 PM
Re: music changer Felix 10 01/05/2005 11:04 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)