miscellaneous

Forum > Miscellaneous > JavaScript/html code for time
Reply To Thread (login)
Nedeku [58]
2014-10-12 18:01:39
[10 years, 45 days ago]

http://jsfiddle.net/user/Nedeku/fiddles/

I'm having some trouble with the time aspect of this code, I'm in the CST area (-6:00) and although I know some script of html and Java I just don't know what I have done wrong let alone how to fix it properly. The above site shows what I have tried working with. One works ok, while the other doesn't show up at all for me to see if it works....can someone help me??


 
Ender [1]
Administrator
2014-10-12 23:31:05
[10 years, 45 days ago]

It looks like "Gorean Time 2" is broken because of a syntax error. Most modern web browsers have built-in JavaScript debuggers which you can use to figure out what's going on. In this case, the first problem it's running into is on line 22:

Uncaught SyntaxError: Unexpected token <

Fix that, run again, and repeat the cycle until all syntax errors are fixed. At that point your script will be running.


 
Nedeku [58]
2014-10-13 12:06:14
[10 years, 44 days ago]

But why doesn't the first one keep a proper display of time given the restraints shown in the description?? As for the second one, I'll try to hammer that one out as soon as I can, thanks Ender


 
Mithrantir [131]
2014-10-13 15:03:46
[10 years, 44 days ago]

A couple of hints for the Gorean Time 2 JS:

  • declare your variables and functions using var and function annotation
  • your innerHTML needs a total rework
  • remember to close your html tags
  • lose the
  • get inspiration from the first Gore Time script section

 
Nedeku [59]
2014-10-18 20:35:33
[10 years, 39 days ago]

I figured out, thanks all for the ideas, now I just need to find a site where I can use the code and show it on a webpage for free


 
Forum > Miscellaneous > JavaScript/html code for time
Reply To Thread (login)