Author Topic: limit to number of updates in ajaxWDwx.js file  (Read 987 times)

0 Members and 1 Guest are viewing this topic.

Offline madridwx

  • Member
  • *
  • Posts: 33
  • Always looking for the perfect storm to photograph
    • http://www.madridiowaweather.com
limit to number of updates in ajaxWDwx.js file
« on: February 04, 2012, 10:08:30 PM »
I'm just about done with my website rebuild and I have one more programing question.  When someone is on the site I would like for that user to be able to hit the clientraw file more than 12 times for updates.  I went into the ajaxWDwx.js file and changed the var maxupdates parameter from 12 to 50, but the site still only updates 12 times.  Is there another spot I need to check to make the update go more than 12 times?

I tried this update with IE8, IE9, and Firefox and got the same result with each browser. 12 updates.  Here's the like to my test site.

www.madridiowaweather.com/wxindex.php
Willard Sharp
For up to the minute weather information in Madrid, IA please visit www.madridiowaweather.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: limit to number of updates in ajaxWDwx.js file
« Reply #1 on: February 04, 2012, 10:14:46 PM »
Hi Willard,

That's the correct place in ajaxWDwx.js .. you currently have
Code: [Select]
var reloadTime = 10000;       // reload AJAX conditions every 5 seconds (= 5000 ms)
var maxupdates = 50;          // Maxium Number of updates allowed (set to zero for unlimited)
which will have a refresh every 10 seconds, for up-to 50 refreshes.

When you make changes to the ajax script, don't forget to do a shift-reload (hold down the shift key and press the reload button) to make sure the browser fetches an updated copy of the script.  Most browsers cache the scripts when the page is first loaded, and don't bother fetching it again from the site until the browser is closed/reopened or a 'hard' reload of the page is done.

Best regards,
Ken
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 madridwx

  • Member
  • *
  • Posts: 33
  • Always looking for the perfect storm to photograph
    • http://www.madridiowaweather.com
Re: limit to number of updates in ajaxWDwx.js file
« Reply #2 on: February 04, 2012, 10:31:41 PM »
That did the trick Ken.  Thanks!

That was the last thing on my checklist.  Looks like I'm ready to go for my "go live" of the new madridiowaweather.com on Monday.  Many thanks for your work (and others) on all these scripts that make neat personal weather websites like this possible.

Willard
Willard Sharp
For up to the minute weather information in Madrid, IA please visit www.madridiowaweather.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: limit to number of updates in ajaxWDwx.js file
« Reply #3 on: February 04, 2012, 10:33:13 PM »
You're very welcome, Willard :)

Welcome to the never-ending-website-improvement hobby 

Best regards,
Ken
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