Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JAVA SCRIPTING - incorparating time scheduling in a slide show

JAVA SCRIPTING - incorparating time scheduling in a slide show

Scheduled Pinned Locked Moved Web Development
javatoolshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nelo Angelo
    wrote on last edited by
    #1

    I'm a newbie at java script and have made a slideshow which randomizes which pics and so on. But now I want to display only certain sets of pics inbetween certain times e.g. between 06:00 am and 07:30 am set 1 then back to normal then 11:45 am and 12:50 pm set 2 and so on, and I'm having problems puting all this on a fullscreen with no scrollbars or anything just the pics. If anyone who reads this can help it would be greatly appreciated. Stay well and ejoy life to the max

    T 1 Reply Last reply
    0
    • N Nelo Angelo

      I'm a newbie at java script and have made a slideshow which randomizes which pics and so on. But now I want to display only certain sets of pics inbetween certain times e.g. between 06:00 am and 07:30 am set 1 then back to normal then 11:45 am and 12:50 pm set 2 and so on, and I'm having problems puting all this on a fullscreen with no scrollbars or anything just the pics. If anyone who reads this can help it would be greatly appreciated. Stay well and ejoy life to the max

      T Offline
      T Offline
      The_Server
      wrote on last edited by
      #2

      hi I dont know how u can check the system time, but... if u know how then u can do this: Set an interval using the 'setInterval' function to check the time every 1000 ms (=every second) or 60000 ms (= every minute). for example

      var NumberOfPicsForEachSet=5;
      var NumberOfSets = 3;
      var use_set = 0;
      // here we create the each set
      var YourSetsOfPics= new Array(NumberOfSets);
      YourSetsOfPics[0] = new Array(NumberOfPicsForEachSet);
      YourSetsOfPics[1] = new Array(NumberOfPicsForEachSet);
      YourSetsOfPics[2] = new Array(NumberOfPicsForEachSet);
      //here we initialize each picture for each set
      YourSetsOfPics[0][0] = "pic01.gif"
      YourSetsOfPics[0][1] = "pic02.gif"
      .
      . // the first [] is for the set and the second [] is for the picture (I think)
      .
      YourSetsOfPics[3][2] = "pic08.gif"
      YourSetsOfPics[3][3] = "pic09.gif"

      function CheckTime()
      {
      var the_time;
      the_time = YourFunctionToGetTheTime();
      use_set= 2; // use the 3rd set in the array
      if ((the_time>"6:00") and (the_time<"7:30"))
      use_set = 0; // use the 1st set in the array
      if ((the_time>"11:45") and (the_time<"12:50"))
      use_set = 1; // use the 2nd set in the array
      }

      function OnDocLoad()
      {
      // check the time every second
      <code> setInterval("CheckTime()",1000);</code>
      }

      Hope I helped you... I m not sure you can use the [][] like I showed you. but if u can... good for you (I think it should work. =-=-=-=-=-=-= The Server :rose:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups