Author Topic: Alt Dashboard Small issue  (Read 1270 times)

0 Members and 1 Guest are viewing this topic.

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Alt Dashboard Small issue
« on: July 11, 2022, 02:36:45 PM »
I have  a 0 showing up in my temperature section of my dashboard. It is in the upper left hand corner. Went through the script could not see anything that would cause this issue.

https://www.goblesweather.com/index.php

Thanks,
Chuck

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alt Dashboard Small issue
« Reply #1 on: July 11, 2022, 03:32:53 PM »
That is very strange.  It's not in ajax-dashboard6.php that I can find, nor is it in a place that would be updated by ajaxWDwx3.js.

I do notice that your settings in ajaxWDwx3.js of
Code: [Select]
var update = // for ajax update interval
   {reloadtime: 3000   // fetch clientraw.txt file every 5 seconds (1000 ms = 1 second )
   ,maxupdates: 0     // Maximum number of updates/fetches allowed (set to zero for unlimited)
                       // maxupdates * reloadtime / 1000 = (number of seconds to update)
                       // i.e. 36 x 5000 / 1000 = 180 seconds (3 minutes)
                       // Note: if you upload your clientraw.txt file every 30 seconds
                       //       then the visitor will see (180/30) = (6 updates in total).
   ,showRefresh: false  // show REFRESH hyperlink after "maxupdates" have been exceeded.
   };

var flash = // for update indicator
   {color: '#00CC00'   // color to flash for changed observations (RGB) (def #00CC00 = green)
   ,red  : '#FF0000'   // color to flash red for warnings/alarms  (RGB) (def #FF0000 = red)
   ,time : 3000        // milliseconds to keep flash color on (2000 = 2 seconds);
   };
makes for a 'busy' display.  May I suggest you use
Code: [Select]
var update = // for ajax update interval
   {reloadtime: 5000   // fetch clientraw.txt file every 5 seconds (1000 ms = 1 second )
   ,maxupdates: 0     // Maximum number of updates/fetches allowed (set to zero for unlimited)
                       // maxupdates * reloadtime / 1000 = (number of seconds to update)
                       // i.e. 36 x 5000 / 1000 = 180 seconds (3 minutes)
                       // Note: if you upload your clientraw.txt file every 30 seconds
                       //       then the visitor will see (180/30) = (6 updates in total).
   ,showRefresh: false  // show REFRESH hyperlink after "maxupdates" have been exceeded.
   };

var flash = // for update indicator
   {color: '#00CC00'   // color to flash for changed observations (RGB) (def #00CC00 = green)
   ,red  : '#FF0000'   // color to flash red for warnings/alarms  (RGB) (def #FF0000 = red)
   ,time : 2000        // milliseconds to keep flash color on (2000 = 2 seconds);
   };
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 gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alt Dashboard Small issue
« Reply #2 on: July 12, 2022, 05:52:12 PM »
I have  a 0 showing up in my temperature section of my dashboard. It is in the upper left hand corner. Went through the script could not see anything that would cause this issue.

https://www.goblesweather.com/index.php

Thanks,
Chuck
You accidently entered a '0' when editing the dashboard.

You can find it by right-clicking on the '0' and 'Insepct'ing.  Go to that section in your text editor, delete the zero, save the dashboard, and you should be good to go.  I've done similar things more than once! #-o
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Alt Dashboard Small issue
« Reply #3 on: July 12, 2022, 05:54:08 PM »
I have done that and there is no zero in the script. Will dig more into it as time permits.

Chuck


Sent from my iPhone using Tapatalk

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alt Dashboard Small issue
« Reply #4 on: July 12, 2022, 05:56:35 PM »
It's there.  Keep plugging away and you'll find it.  The alt-dashboard's construction sometimes defies linear analysis.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline hcorrin

  • Contributor
  • ***
  • Posts: 126
    • Ballaugh Weather
Re: Alt Dashboard Small issue
« Reply #5 on: July 18, 2022, 05:15:53 PM »
looking at mine you need to look between lines 620 and 645 if you have notepad ++ then search for 0 then look for the line number

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alt Dashboard Small issue
« Reply #6 on: July 18, 2022, 06:15:58 PM »
I'm not sure this is the issue, but your ajax-dashboard6.php line 608 is:
Code: [Select]
                document.write(' <small><i>(<span id="ajaxcounter">0</span>&nbsp;<?php langtrans(&#39;sec ago&#39;); ?>)</i></small>');
and is not accompanied by any <script type="text/javascript"><!-- at the beginning and --></script> at the end.

In the release code that line should just be
Code: [Select]
                <small><i>(<span id="ajaxcounter">0</span>&nbsp;<?php langtrans(&#39;sec ago&#39;); ?>)</i></small>
without any JavaScript.  Try changing that and see if the phantom 0 goes away.
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 andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Alt Dashboard Small issue
« Reply #7 on: July 19, 2022, 02:56:55 PM »
I tried that it still appears. Will continue to look for the issue.

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Alt Dashboard Small issue
« Reply #8 on: August 02, 2022, 03:44:02 PM »
I just started from scratch. Also I took out the noaarecords.php script as well.

Chuck

 

anything