Author Topic: Double Update times on main page  (Read 407 times)

0 Members and 1 Guest are viewing this topic.

Offline mickopla

  • Forecaster
  • *****
  • Posts: 358
    • Waterford City Weather
Double Update times on main page
« on: March 22, 2019, 06:55:35 AM »
This is best illustrated by looking at the attached pic but basically i'm getting two update times on the homepage of my Alt-Dash script. Not a massive big deal but annoying to look at for me. any ideas what may be the issue.

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Double Update times on main page
« Reply #1 on: March 22, 2019, 10:50:43 AM »
You do seem to have a missing </script> tag in index.php
Code: [Select]
</div>
<script type="text/javascript"/>

 

</div><!-- end column-dark -->

</div><!-- end main-copy -->
it should likely have something like
Code: [Select]
</div>
<script type="text/javascript">

 
</script>
</div><!-- end column-dark -->

</div><!-- end main-copy -->
instead.

Also, your AJAX script is the default template script (ajaxWDwx.js) and not the expected one for using the alternative dashboard (ajaxWDwx3.js) so that may also be an issue. 
The two update times (one on the dashboard and one on the gizmo) are expected since they both run from the AJAX script .. is that the issue you're talking about??
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mickopla

  • Forecaster
  • *****
  • Posts: 358
    • Waterford City Weather
Re: Double Update times on main page
« Reply #2 on: March 22, 2019, 12:31:38 PM »
You do seem to have a missing </script> tag in index.php
Code: [Select]
</div>
<script type="text/javascript"/>

 

</div><!-- end column-dark -->

</div><!-- end main-copy -->
it should likely have something like
Code: [Select]
</div>
<script type="text/javascript">

 
</script>
</div><!-- end column-dark -->

</div><!-- end main-copy -->
instead.

Also, your AJAX script is the default template script (ajaxWDwx.js) and not the expected one for using the alternative dashboard (ajaxWDwx3.js) so that may also be an issue. 
The two update times (one on the dashboard and one on the gizmo) are expected since they both run from the AJAX script .. is that the issue you're talking about??

Hi Ken
Changing the AjaxWDwx.js to AjaxWDwx3.js did fix my problem but now units are defaulting to Imperial instead of Metric. How do i ensure Metric is the default??
Cheers

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Double Update times on main page
« Reply #3 on: March 22, 2019, 12:47:19 PM »
I also see that the switching from metric to imperial is not working.  This may be due to two things:
1) lots of HTML validation errata on the page
2) one or more add-on JavaScripts having issues

I'd recommend fixing the HTML issues first ( changing '&' to '&amp;' in all URLs, fixing unclosed tags, etc), then see if that resolves the issues.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything