954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Html Rotators

Hey all,

I was wondering does anyone know of any html rotator scripts that can be time coded to show a particular picture at a specified time of day? I have an internet radio station and I would like to show my personalities on the home page to my website as they are broadcasting, and once their show is over the picture of the next personality would pop up.

I've tried to use PHP and I was like 30 seconds from putting an axe to my pc. I use Yahoo site builder to build my site and there is a section in my control panel that will take me to a PHP folder but I can't get it to work. Html is so much easier.

Please help! :sad:

dallas9712
Newbie Poster
2 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

Something nuts like this?

<html>
<head>
      <script type="text/javascript">
      function startTime()
      {
	       /* Paths To The Pictures To Load */
               var picpath1 = "http://www.someurl.com/pics/djlady.jpg";
               var picpath2 = "http://www.someurl.com/pics/djdude.jpg";
               var picpath3 = "http://www.someurl.com/pics/djnewguy.jpg";


		/* Times of Triggers */
		var hour1 = 5;
		var hour2 = 8;
		var hour2 = 11;
		var min1 = 0;
		var min2 = 0;
		var min3 = 0;
		var sec1 = 0;
		var sec2 = 0;
		var sec3 = 0;
 
                var today=new Date();
                var h=today.getHours();
                var m=today.getMinutes();
                var s=today.getSeconds();

		if (h == hour1) && (m == min1) && (s == sec3) { 
			document.write('<IMG SRC="' + picpath1 + '>');
		} else if (h == hour2) && (m == min2) && (s == sec3) {
			document.write('<IMG SRC="' + picpath2 + '>');
		} else if (h == hour3) && (m == min3) && (s == sec3)  {
			document.write('<IMG SRC="' + picpath3 + '>');
		}
      }
      </script>
</head>

<BODY>
	<SCRIPT LANGUAGE="Javascript">
		startTime();
	</SCRIPT>
</body>
</html>
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

That would be great however, I'm not sure just how to add it to the script I am already using. Here's the code I'm using. I can change the interval of the pictures that are rotating by seconds. I would like them to rotate like (picture 1 - 10:00 am - 2:pm) (picture 2 - 2:00 pm - 6:00pm) and so on. I tried to implement the script you sent but I couldn't get it to work.

Also: Should I be concerned that I am in central standard time will the script work for all time zones?



dallas9712
Newbie Poster
2 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

I too need help with this exact issue. I do not know how to use this code.

LittleStar
Newbie Poster
1 post since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You