[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] JavaScript-ur



On Thu, 26 May 2005 00:19:20 +0200
"Michael Schmidt" <sslug@sslug> wrote:

> Hej
> Jeg har lavet et simpelt ur på en xml-side i JavaScript, men er
> irriteret over at det henter sin tid fra klientens systemur (jeg ved
> jo ikke om det går rigtigt)
> Kan jeg på enkel vis hente klokken fra en kilde, der er uafhængig af
> både web-serveren og klienten, der ser siden?

nu er det jo clientside at det udføres på så det er jo logisk at det
er uret herfra der bruges. 
En mulighed kunne jo være at lave et serverside script der henter data
fra en eller anden kilde og så skrive den ind i en variabel når siden
loades for derefter at lade en timer "tælle" videre på dette
timestamp. 
Alternativt kan du kigge lidt på Ajax (buzzword for javascript der laver
http requests+lidt andt) og den måde det henter en side og viser den
på. 
under alle omstændigheder vil du få noget upræcision pga transfer time
- med mindre du selvfølgelig implementerer en hel lille ntp klient i
javascript :-)

-- 
   Kim Schulz   | Stop Software patents before it is too late!  
 Geek by nature | 
   schulz.dk    |   


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *