During the fall and winter, we tend to have a lot of Special Weather Statements
due to Lake Ontario lake effect snow.
Like right now, there is a “special weather statement” from the
NWS. Any way I can get the warnings javascript on the template to
recognize that also and put a box up at top the page?
Here is the code I have currently:
<script type="text/javascript">
<!-- Javascript advisory message only appears when there is an advisory -->
<!--
var warning = "NO CURRENT ADVISORIES".toUpperCase();
var link = "wx4.html";
if (warning != "NO CURRENT ADVISORIES"){
if (warning.indexOf("WATCH") > 0) {
document.write('<div class="watchBox"><a href="' + link + '" style="color: #FFFFFF;"><b><span
style="text-transform: uppercase;">NO CURRENT ADVISORIES</span></b> IN EFFECT ... [Click here
for more info]</a></div>
');
}
else if (warning.indexOf("WARNING") > 0) {
document.write('<div class="warningBox"><a href="' + link + '" style="color: #FFFFFF;"><b>
span style="text-transform: uppercase;">NO CURRENT ADVISORIES</span></b> IN EFFECT ... [Click here
for more info]</a></div>
');
}
else {
document.write('<div class="advisoryBox"><a href="' + link + '" style="color: #000000;"><b><span
style="text-transform: uppercase;">NO CURRENT ADVISORIES</span></b><b> </b> [Click here
for more info]</a></div>
');
}
}
//-->
</script>
You are using two different sources to pull advisories. The home page is using WD and WD tags. The advisories page is using the advisories PHP code in an
Any time you use two different ways to get data, you’re going to occasionally end up with times when they don’t agree. So, your choices are: 1) Only use one source for advisories; 2) Live with the occasional inconsistencies.