-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

2 Answers2

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.

epascarello
  • 204,599
  • 20
  • 195
  • 236
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

Community
  • 1
  • 1
Devendra Soni
  • 1,924
  • 12
  • 16