This script displays a clickable US map that has been modified to open on click a NWS regional map in a new tab. This map in turn displays a VERY localized forecast and current conditions page. The US map auto-updates every 2 minutes with an ajax timeout on the SaratogaWx script page and no timeout on the stand-alone page. I let the stand-alone page run overnight last night, and it was up to date this morning. The idea for this page originally came from Steve at
DaculaWeather.
If your site doesn't switch between narrow and wide css files, modify
<div id="main-copy" style=" border:inset; width:<?php echo ($_SESSION['CSSwidescreen']==1 ? -1 : 806) ?>px" class="bCenter">
to set a fixed width ~806px on a narrow site or no width on a wide site, thus eliminating the php conditional statement.
I like the fact that you can drill down to virtually anywhere in the US with a couple of clicks starting with
this map.
Thanks again, Steve!
Edit: There is a new script available, wxusalerts1a.zip, that includes the clickable NWS Legend. The legend items link to current NOAA/NWS text messages in that category. Because the legend uses css formatting, a new stylesheet, wxusalerts.css, is now included. Just upload both files to your site in order to run the revised script.
Edit 26 Jan 2013: The Legend was improperly formatted via the stylesheet, and wasn't stable across browsers. I've reworked the php script and the css stylesheet to better display the legend, and it is stable across browsers. The script validates at validator.w3c.org, but still has a remaining problem. The reworked css hides the flyout menu text in Safari, although it's still visible during mouse over. The ;new script and stylesheet are in wxusalerts1d.zip
Edit 27 Jan 2013: It appears that I was having cache issues with Safari, and that flushing the cache with the 'Ctl-Alt-E' shortcut was needed in order to evaluate my changes with this browser. The wxusalerts1e.zip attached cleans up a little of the stylesheet code, and it renders as desired in all modern browsers while validating. No other files will be attached here now.
Edit2 27 Jan 2013: The home page map at
NOAA/NWS now shows 31 Legend categories instead of the previous 25. The wxalerts1f.zip has a Legends section that has been updated accordingly. I may have to chase this down for a while in order to get a Legend that's complete. If they change colors, and so far they haven't, then all bets are off. This zip is current as of now.
Edit 28 Jan 2013: Today's gift from NOAA/NWS is four more Legend categories making a total of 35. The wxalerts1g.zip has a suitably enlarged Legends section. There were also some slight color changes this morning, but the zip is current as of this moment.
Edit2 28 Jan 2013: Another Legend item just popped up, a Flash Flood Warning in Hawaii. It occurs to me that there quite a few other alerts/watches/warnings yet to be seen, such as with regard to tornadoes. Zip wxusalerts1h is current as of now.
Edit 29 Jan 2013: Three more Legend items appeared this morning: Severe Thunderstorm Warning, Tornado Watch, and Blowing Dust Advisory for a total of 39 items today. Perhaps a reversion to the initial script, wxusalerts.zip, would be a good option until Legend stability is achieved, if ever. The latest legend is in wxusalerts1i.zip and I've reposted the initial script.
Edit2 29 Jan 2013: We're now up to 41 Legend items in wxusalerts1j.zip Today has been a 'good' day for severe watches and warning--rather remarkable considering it's January.
Edit 30 Jan 2013: Yesterday was busy with the huge system in the central US doing its thing. There are currently 48 Legend items, and I've changed the Alaska and Hawaii map locations. That along with some added text have prompted the move to wxusalerts2.zip
Edit 31 Jan 2013: The recent storm added six more Legend items, making a total of 54 now shown in wxusalerts2a.zip The explanatory text has been modified as well.
Edit 1 Feb 2013: Another new Legend item, Freeze Warning, appeared this afternoon for a total of 55 in wxusalerts2b.zip
Edit 2 Feb 2013: 'Civil Emergency Message' showed up this afternoon in ND due to blowing snow closing an Interstate. That's not one I expected at all. It's added into wxusalerts2c.zip
Edit 6 Feb 2013: 'Hazardous Seas Warning' appeared today off the Pacific Coast. It's added to wxusalerts2d.zip
Edit 7 Feb 2013: 'Coastal Flood Watch', 'Hurricane Force Wind Watch', and 'Blizzard Watch' all added to wxusalerts2e.zip
Edit 8 Feb 2013: 'Hurricane Force Wind Warning' is now up in the Atlantic off New England. Added to wxusalerts2f.zip
Edit2 8 Feb 2013: '911 Telephone Outage Emergency' has appeared, but there's no associated text. Added to wxusalerts2g.zip
Edit 15 Feb 2013: 'Hard Freeze Alert' is up for parts of Florida into tomorrow night. Added to wxusalerts2h.zip
Edit 20 Feb 2013: 'Ice Storm Warming' now seen in North Central Arkansas, and has been added to wxusalerts2i.zip
Edit 23 Feb 2013: 'Freezing Fog Advisory' seen now in upper Mississippi valley. Added to wxusalerts2j.zip
Edit 25 Feb 2013: The code now accommodates the Legend automatically in wxusalerts3.zip. Thanks, Ryan.
Edit 3 Mar 2013: 'Child Abduction Alert' added to wxusalerts3a.zip
Edit 9 Mar 2013: The autoupdate timeout allows only two or three updates of the maps before timing out. Camping on this page results in a hit on the NWS server only every 2 minutes, which is far from excessive, so wxusalerts4_no_timeout.zip doesn't time out. The timeout code remains in place and has just been commented out. There are no other changes from v3a.
Edit 17 April 2013: NWS has changed the color of 'Flash Flood Watch' to match that of 'Flood Watch', thereby eliminating any visual distinction between them. Makes no sense to me, but the change is in wxusalerts4a.zip There's still no timeout in the 4 series, and the color change has prompted me to remove all prior versions.
Edit2 17 April 2013: I've included code in wxusalerts4b.zip to check for the use of the $_SESSION['CSSwidescreen'] flag before using its state or lack thereof to center the output.
Edit 2 May 2013: Two new alert codes are in effect this evening, 'Heat Advisory' and 'Hard Freeze Warning'. They have been added to the legend in wxusalerts4c.zip.
Edit 5 June 2013: Four new alert codes were posted this evening: 'Tropical Storm Warning', 'Excessive Heat Warning', 'Hazardous Seas Watch', and 'Excessive Heat Watch'. They have been added to the legend in wxusalerts4d.zip.
Edit 5 November 2013: The Legend now toggles on and off in version 5. Version 4d with the permanently displayed Legend is also still available.
Edit 5 December 2013: A new alert code is in effect this morning, 'Wind Chill Warning'. It has been added to wxusalerts5a.zip along with a setting, '$toggleAlerts'; this is the only version available.
Edit 26 March 2014: A new alert code is in effect today, 'Coastal Flood Warning'. It has been added to wxusalerts6.zip and the NWS modifications to the freezing weather codes have been incorporated. They had overloaded the #00FFFF color and I think they are correcting the problem. Time will tell.
There was an error in wxusalerts6.zip's validation. wxusalerts.6a.zip corrects this.Edit 14 April 2014: The NWS has made further undocumented color changes to the freezing weather codes. These are incorporated into wxusalerts6b.zip
Edit2 14 April 2014: I've posted a new script as 'wxusalerts-all.zip'
here that uses the dynamic legends that the NWS posts on
www.weather.com rather than the static legend of the prior versions.
Edit 8 December 2017: The Alaskan links have changed, so all prior versions of this script are obsolete. The new version,
20171208, contains the proper AK links. (Right-click and select 'Save as...' and save not as a '.txt' but as '.php' file.