Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: Need help with script
is a discussion within theSkinning / Themes Discussion
forums, a part of theDesign and Media For the iPhone / iPod Touch
section;I have been trying to create a HTML file that will load 7 different HTML wallpapers 1 for each day of the week eg: 1.html for Monday 2.html for Tuesday
...-
09-20-2012, 11:47 AM #1
Need help with script
I have been trying to create a HTML file that will load 7 different HTML wallpapers 1 for each day of the week eg: 1.html for Monday 2.html for Tuesday and so on. I tried to use a scrip posted on this site in another thread that was used to load a different wallpaper picture for each day of the week but no luck. Please I need some help.
This is the script I was trying to use
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style>
body {
background-color: black;
margin: 0;
padding: 0;
height: 480px;
width: 320px;
}
img {
-webkit-transition-property: opacity;
-webkit-transition-duration: 3s;
position: absolute;
width: 320px;
height: 480px;
}
</style>
</head>
<body style="color: black">
<SCRIPT type="text/javascript">
var photos = new Array();
photos[0] = "wallpaper/0.JPG";
photos[1] = "wallpaper/1.JPG";
photos[2] = "wallpaper/2.JPG";
photos[3] = "wallpaper/3.JPG";
photos[4] = "wallpaper/4.JPG";
photos[5] = "wallpaper/5.JPG";
photos[6] = "wallpaper/6.JPG";
photos[7] = "wallpaper/7.JPG";
var today=new Date();
var currentTime = today.getHours();
var thisDay=today.getDay();
if (currentTime>=0 && currentTime<4);
{
var img = new Image();
img.src=photos[7];
document.body.appendChild(img);
}
if (currentTime >=4)
{
var img = new Image();
img.src=photos[thisDay];
document.body.appendChild(img);
}
</SCRIPT>
<body>
</body></html>Last edited by Lil_lippi; 09-20-2012 at 11:56 AM.




LinkBack URL
About LinkBacks
Reply With Quote