autoupdate 2017
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
autoupdate 2017
Accidentally posted this is general, deleted and reposted here where it belongs
Tryin to get my site seaworthy, was doin some random tests, hit autoupdate and dallas vs giants were already a final in week 1! dont forget to change that line in "update scores.asp"
From
to
also if you use the scorestrip dont forget under /script/scoreboard.js
Anything anyone else can remember for yearly trash cleanup?
I hate gettin old, I really should write all this down
Tryin to get my site seaworthy, was doin some random tests, hit autoupdate and dallas vs giants were already a final in week 1! dont forget to change that line in "update scores.asp"
From
Code: Select all
var scoresUrlBase = "http://www.nfl.com/scores/2016/REG"
Code: Select all
var scoresUrlBase = "http://www.nfl.com/scores/2017/REG"
Code: Select all
var isPlayoffs = false;
I hate gettin old, I really should write all this down
Re: autoupdate 2017
There is an easy update you can make so that you don't have to change the UpdateScores.asp page each year.
Where you normally change the year, add the first line below and then change the year (i.e. 2017) to be " + currentYear + " as in the 2nd line. This way it will get the current year for the URL automatically.
Where you normally change the year, add the first line below and then change the year (i.e. 2017) to be " + currentYear + " as in the 2nd line. This way it will get the current year for the URL automatically.
Code: Select all
var currentYear = new Date().getFullYear();
var scoresUrlBase = "http://www.nfl.com/scores/" + currentYear + "/REG";
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: autoupdate 2017
WOW! Thank you very much!