| Forum Index | FAQ | New User | Login | Search |
![]() |
| Subject | Are there any Javascript experts here? |
![]() |
| Posted by | postamessage | |
| Posted on | 09/06/06 09:11 PM | |
|
| ||
| Subject | Errors ![]() |
![]() |
| Posted by | Snowball 2 | |
| Posted on | 09/06/06 09:33 PM | |
|
Each expression is evaluated on its own so you have to write them both completely. Also you have impossible conditions. The &&(AND) should probably be ||(OR). Both expressions have to be true for that code to execute. You can't have a number that's less than 12 and greater than 16 at the same time. I'm not sure what you're assuming given the numbers in your code but if you were to write this as 0 to 11 as AM and 12 to 23 as PM then it would look like this.
And this might have been what you were aiming for (again assuming 0-23 hours).
| ||
![]() ![]() ![]() ![]() ![]() |