[aprssig] Time stamps on FINDU pages?
Tapio Sokura oh2kku at iki.fiWed Apr 27 01:38:25 UTC 2005
- Previous message: [aprssig] Time stamps on FINDU pages?
- Next message: [aprssig] the (UIDIG ROM bug) and the New WIDEn-n Paradigm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steve Dimse wrote: > nothing to the presentation of the data. The only thing I would consider > adding is a javascript clock that kept counting the age of the data, > for example, on the find page where it says last report "2 minutes and 8 > seconds ago". If someone produced a script that accepts the timestamp of You can see an example of this done with javascript at http://www.oh2kku.ham.fi/karttaframe/oh2kku (replace the last part with an aprs object/item/callsign in Finland). The page is in Finnish, but the javascript code is visible in the source and should be almost self-explanatory. I'm not sure if vintage browsers support this, at least it seems to work in Mozilla 1.6, MSIE 6 and Opera 7.54. The constants in startage() are filled-in by the server when generating the page. pageloadtime is the current time in unix timestamp * 1000 and the plain number when setting the object time is the age of the object in milliseconds. The math is done this way so it doesn't depend on the user's clock being right. It does fail if the user for one reason or another radically changes the time on his computer after the page is loaded. The running of the script is triggered by the body onload -structure. To keep it running, the update function has to be scheduled to run again after every callback. The part on the page that is updated by the script is surrounded by span-tags so it can be uniquely identified. If the user has disabled javascript on his browser, the age of the object on the page just doesn't change. I guess it would be better to change the display so that if javascript is disabled, you can clearly notice that the age does not update without refreshing the page (when looking at old objects). Tapio
- Previous message: [aprssig] Time stamps on FINDU pages?
- Next message: [aprssig] the (UIDIG ROM bug) and the New WIDEn-n Paradigm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the aprssig mailing list
