Script for switching between two applets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Smith

    #1

    Script for switching between two applets

    I have 2 web cameras that are displayed in my html page by two different
    applets. I did not write the appletts, I just put them into the web page.

    Question 1: Is there a way to have this image on the page change from one
    camera to the other every 15 seconds?
    Question 2: Is there a way to have the cameras only appear during a certain
    time of the day and have a jpg appear the rest of the time - i.e. daylight
    hours?

    Camera #1
    (I altered the actual link to the cameras.)

    <applet name="cvcs" codebase="http://x.x.x.x:80/" code="xplug.cla ss"
    width=320 height=240</td>
    <param name="RemotePor t" value="80">
    <param name="Timeout" value=5000>
    <param name="RotateAng le" value=0>
    <Param name="PreviewFr ameRate" value=2>
    <param name="Deviceser ialNo" value="aGFyYm9y Om1hcmsxMjM=">
    </applet>

    Camera #2

    <applet name="cvcs" codebase="http://x.x.x.x:81/" code="xplug.cla ss"
    width=320 height=240</td>
    <param name="RemotePor t" value="81">
    <param name="Timeout" value=5000>
    <param name="RotateAng le" value=0>
    <Param name="PreviewFr ameRate" value=2>
    <param name="Deviceser ialNo" value="aGFyYm9y MjptYXJrMTIz=">
    </applet>

    Thanks,

    Kevin


  • enrique

    #2
    Re: Script for switching between two applets

    #1: Experiment with modifying the <applet> tags' "codebase" attribute
    and see if you can do that using javascript.

    #2: Getting the current time of day (on the client only) is
    well-documented. Look it up. Just remember that this is the end
    user's time of day, not the time of day where the pictures are being
    taken. As for the JPG image replacing an applet, I don't know if this
    is possible without reserving a new page.

    I'm sure you can utilize browser-specific features to pull some of this
    off, but try to do so in a browser-agnostic way.

    I'd love to hear how this goes, so don't forget to post your results.

    Comment

    • Dr John Stockton

      #3
      Re: Script for switching between two applets

      JRS: In article <1115997279.514 165.150110@z14g 2000cwz.googleg roups.com>
      , dated Fri, 13 May 2005 08:14:39, seen in news:comp.lang. javascript,
      enrique <enrique.pineda @gmail.com> posted :[color=blue]
      >
      >#2: Getting the current time of day (on the client only) is
      >well-documented. Look it up. Just remember that this is the end
      >user's time of day, not the time of day where the pictures are being
      >taken.[/color]

      The GMT is also readily available, and if the longitude of the each
      camera is known then the local standard time there is easy to determine.

      It's not much harder to predict, roughly, the length of the day at the
      camera, if its latitude is also known. Consult astronomy sources.
      You'll probably want to use the Civil Twilight times.

      --
      © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
      Web <URL:http://www.merlyn.demo n.co.uk/> - FAQqish topics, acronyms & links;
      Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.
      No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

      Comment

      Working...