-4

These two pages have identical code, but the index.html page will not load the javascript countdown clock. Any suggestions?

http://theshowffl.com/test.html

http://theshowffl.com/index.html

4
  • By looking in the JavaSript console, I get this error - "Uncaught SyntaxError: Unexpected end of input". I don't see why you don't just replace index.html with test.html... Commented Jul 22, 2014 at 5:39
  • UM what is this: <html> <head> <!doctype html><html class="no-js" lang=""> <head> Commented Jul 22, 2014 at 5:40
  • David , thanks for the reply. That's what I've done, copied test and pasted into index. Commented Jul 22, 2014 at 5:45
  • epascarello, that is some markup that came with boilerplate. I need to clean some stuff up. Same result with or w/o those lines. Commented Jul 22, 2014 at 5:45

2 Answers 2

4

First you have bad HTML, two html and head tags.

Second, the code fails because the document has no line breaks so the comments will hide the rest of the code.

<script type="text/javascript">         var clock;          $(document).ready(function() {              // Grab the current date                var currentDate = new Date(); ...
                                                                                                        ^^ Hides the rest of the JS code

What ever you did to "compress" the file to remove line breaks was a bad idea.

Sign up to request clarification or add additional context in comments.

1 Comment

That was it. Thanks! I'll get the rest cleaned up also.
1

Hi i have gone through both urls actually the problem is commented lines in script.

In the div(class="mainBody") you are using script which causing this issue or you can say on both pages this script is different.

http://theshowffl.com/test.html html is:-

enter image description here

http://theshowffl.com/index.html html is:-enter image description here

see the both javascripts ,first one contains 22 lines and second one is 1 line(comments are creating problem in it )

so if you will use the first page script into the second page or remove the comments from the second page then your problem might be solved.

Thanks

2 Comments

Thank you! Removing the comments did the trick.
please vote the answer if it worked for you :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.