![]() |
[Javascript] Is this even remotely correct?
Hello.
I am trying to get a website to display a specific thing based on the hour of the day. I *think* this works (I'm a C person myself) but when I drop it into the CMS I'm using it displays nothing. Thoughts? Code:
<script Language="JavaScript"> |
I think "break" is suppose to have ; at the end
I'm drunk btw, don't blame me if its the way its suppose to be |
You don't need ; on breaks, in Javascript at least.
This code seems to run fine on my box; I just make a blank html and inserted the Script. This sounds like an issue with your CMS or how this jscript is integrated with your other code (if any). That said, wouldn't it be simpler to write it this way? It seems a bit clunky to make an switch statement for 24 cases when you only have a few options; Code:
<script language="JavaScript"> |
Quote:
Quote:
Now if only I can get it to work in the CMS :) thanks again |
All times are GMT -8. The time now is 12:51 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project