Script for switching between two applets

J

John Smith

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.class"
width=320 height=240</td>
<param name="RemotePort" value="80">
<param name="Timeout" value=5000>
<param name="RotateAngle" value=0>
<Param name="PreviewFrameRate" value=2>
<param name="DeviceserialNo" value="aGFyYm9yOm1hcmsxMjM=">
</applet>

Camera #2

<applet name="cvcs" codebase="http://x.x.x.x:81/" code="xplug.class"
width=320 height=240</td>
<param name="RemotePort" value="81">
<param name="Timeout" value=5000>
<param name="RotateAngle" value=0>
<Param name="PreviewFrameRate" value=2>
<param name="DeviceserialNo" value="aGFyYm9yMjptYXJrMTIz=">
</applet>

Thanks,

Kevin
 
E

enrique

#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.
 
D

Dr John Stockton

JRS: In article <[email protected]>
, dated Fri, 13 May 2005 08:14:39, seen in
enrique said:
#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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top