[Phphtmllib-devel] SF.net SVN: phphtmllib:[3335] trunk/open2300/htdocs/js/main.js
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2010-02-21 19:58:59
|
Revision: 3335 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3335&view=rev Author: hemna Date: 2010-02-21 19:58:52 +0000 (Sun, 21 Feb 2010) Log Message: ----------- added more junk and auto update the timelapse time Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2010-02-21 19:58:07 UTC (rev 3334) +++ trunk/open2300/htdocs/js/main.js 2010-02-21 19:58:52 UTC (rev 3335) @@ -4,6 +4,7 @@ function start_updates() { + //init_calendar_popup(); set_orig_time(new Date()); var counter = new PeriodicalExecuter(function() { @@ -100,10 +101,18 @@ //update the image new PeriodicalExecuter(function(pe) { - var img = $('idCamImg'); + var img = $('idWebCamImg'); img.src="http://wx.hemna.com/cam/cam.jpg?junk="+get_junk(); },15); - + + new PeriodicalExecuter(function(pe) { + new Ajax.Updater('idWebCam','/?ajax=1&ajaxid=idWebCam&target=web-cam&junk='+get_junk() , + {method:'get',asynchronous:true,evalScripts:true, + onComplete: function() { + new Effect.Pulsate('idWebCamFlasUpdate', {pulses: 5, duration: 1.5}); + }}) + }, + 300); } @@ -137,8 +146,9 @@ function get_junk() { - var d = new Date(); - return d.getDate()+d.getHours()+d.getSeconds(); + var d = new Date(); + var junk=d.getMonth()+1+''+d.getDate()+''+d.getHours()+''+d.getSeconds(); + return junk; } function set_orig_time(new_time) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |