![]() |
|
| |||||||
| Notices |
| BlueVoda Tips, Tricks and Shortcuts Know a great BlueVoda (or Web design) tip or trick? Share it with the world here. Become famous for your brilliance! Please, No Questions or Problems! |
![]() |
| | Thread Tools |
|
#1
| ||||
| ||||
|
Here is a small usefull free script that I picked up on my travels.............. upload the required 7 different images named: sunday.jpg monday.jpg tuesday.jpg wednesday.jpg thursday.jpg friday.jpg saturday.jpg Then Just copy and paste the script below into a Bluevoda HTML box Size and place where required on your page: <SCRIPT LANGUAGE="JavaScript"> <!-- This script and many more are available free online at --> <!-- Rainbow Arch: http://rainbow.arch.scriptmania.com --> <!-- Begin today = new Date(); day = today.getDay(); arday = new Array("sunday.jpg", "monday.jpg", "tuesday.jpg", "wednesday.jpg", "thursday.jpg", "friday.jpg", "saturday.jpg"); document.write("<img src='" + arday[day] + "'>"); // End --> </SCRIPT> |
|
#3
| |||
| |||
|
Hi David,if i wanted to change and image every 12 hours for 30 days,would i change the code to <!-- Begin today = new Date(); day = today.getDay(); arday = new Array("sunday12am.jpg","sunday12pm.jpg", "monday.jpg", "tuesday.jpg", "wednesday.jpg", "thursday.jpg", "friday.jpg", "saturday.jpg"); document.write("<img src='" + arday[day] + "'>"); // End --> </SCRIPT> would i continue doing that for every day of the month,or it would be totally be diffrent. thks in advance . |
|
#4
| ||||
| ||||
| Quote:
Code: <script language="javascript">
<!-- Begin
var today = new Date();
var day = today.getDay();
var hour = today.getHours();
var daysAM = new Array("sundayAM.jpg", "mondayAM.jpg", "tuesdayAM.jpg", "wednesdayAM.jpg", "thursdayAM.jpg", "fridayAM.jpg", "saturdayAM.jpg");
var daysPM = new Array("sundayPM.jpg", "mondayPM.jpg", "tuesdayPM.jpg", "wednesdayPM.jpg", "thursdayPM.jpg", "fridayPM.jpg", "saturdayPM.jpg");
if(hour < 12)
document.write('<img src="' + daysAM[day] + '" />');
else
document.write('<img src="' + daysPM[day] + '" />');
// End -->
</script> You also would need to create the two images, ie.. sundayAM.jpg and sundayPM.jpg, for each day of the week. The name of the images can be changed but make sure you change it in the corresponding name in the javascript
__________________ Register/Login Script Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |