Author Topic: New Script to Display US NWS Graphical Forecast Maps  (Read 6486 times)

0 Members and 1 Guest are viewing this topic.

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #25 on: January 29, 2017, 03:47:34 PM »
Hey Jon

Page loads fine, well, almost fine for me, but I think your problem is that you've made a mistake in your location of the main scripts for the slideshow. This section below, located at line 218 in your page should be up, inside of your </head> tag and not in the <body> part of your page.
Also remove that extra
</head>
<body>
at the end of it. It's just a copy and paste error. Get the part below into your head tag and you should be fine.

Code: [Select]
<!-- module wsusfcsshow.php ==== version: 1.0c -->
<link rel="stylesheet" type="text/css" href="./WU-History/WU-HistoryGray.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="./usa/WxUSFCSShow/scripts/swissarmy.js" type="text/javascript"></script>
<script src="./usa/WxUSFCSShow/scripts/wxusfcsshow.js" type="text/javascript"></script>

<style type="text/css">
/* Slideshow */
.hidden {
 display: none;
 margin: auto;
}
.visible {
 display:  block;
 margin: auto;
}
.center{
 margin: auto;
}

</style>
<script type="text/javascript">
   window.onload=function(){show_tab2("d7tempfc")};
</script>
</head>
<body>


I figured it out....stupid me... ](*,) ](*,) ](*,)


The folder I have it in is wsusfcsshow. The file was looking for the WxUSFCSShow folder. Got it corrected.


Thanks for the assist.


Regards,


Jonny J
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline MackerelSky

  • Contributor
  • ***
  • Posts: 113
    • McKean County Weather, Smethport Pa.
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #26 on: January 29, 2017, 04:26:33 PM »
Hey Jon

Page loads fine, well, almost fine for me, but I think your problem is that you've made a mistake in your location of the main scripts for the slideshow. This section below, located at line 218 in your page should be up, inside of your </head> tag and not in the <body> part of your page.
Also remove that extra
</head>
<body>
at the end of it. It's just a copy and paste error. Get the part below into your head tag and you should be fine.

Code: [Select]
<!-- module wsusfcsshow.php ==== version: 1.0c -->
<link rel="stylesheet" type="text/css" href="./WU-History/WU-HistoryGray.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="./usa/WxUSFCSShow/scripts/swissarmy.js" type="text/javascript"></script>
<script src="./usa/WxUSFCSShow/scripts/wxusfcsshow.js" type="text/javascript"></script>

<style type="text/css">
/* Slideshow */
.hidden {
 display: none;
 margin: auto;
}
.visible {
 display:  block;
 margin: auto;
}
.center{
 margin: auto;
}

</style>
<script type="text/javascript">
   window.onload=function(){show_tab2("d7tempfc")};
</script>
</head>
<body>


I figured it out....stupid me... ](*,) ](*,) ](*,)


The folder I have it in is wsusfcsshow. The file was looking for the WxUSFCSShow folder. Got it corrected.


Thanks for the assist.


Regards,


Jonny J

Not to get into a spitting match Jon and I see that it's somehow working, if you look at the original wsusfcsshow.php that came in Jerry's download, everything I pointed out to you should be within your <head> tag and not down in the <body> of the page with the links to the different maps and such.

This is a snippet from Jerry's original page.
Code: [Select]
<link rel="stylesheet" type="text/css" href="./WU-History/WU-HistoryGray.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script src="./WxUSFCSShow/scripts/swissarmy.js" type="text/javascript"></script>
<script src="./WxUSFCSShow/scripts/wxusfcsshow.js" type="text/javascript"></script>

<style type="text/css">
/* Slideshow */
.hidden {
 display: none;
 margin: auto;
}
.visible {
 display:  block;
 margin: auto;
}
.center{
 margin: auto;
}

</style>
<script type="text/javascript">
window.onload=function(){show_tab2("d7tempfc")};
</script>
</head>
<body>

Hope this helps...
All the Best
Brad
Mckean County Weather
Located on upper Marvin Creek
https://mckeanweather.com/
Davis VP2 + fars
Cumulus 1.9.4-b1092

 

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #27 on: January 29, 2017, 04:32:14 PM »
That is in the <head>.
I never changed that section.


Here's the same section from mine...


Code: [Select]
$page_title     = langtransstr('US Graphical Forecast Map');
#
 
#
?>
<!-- module wsusfcsshow.php ==== version: 1.0c -->
<link rel="stylesheet" type="text/css" href="./WU-History/WU-HistoryGray.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="./usa/wsusfcsshow/scripts/swissarmy.js" type="text/javascript"></script>
<script src="./usa/wsusfcsshow/scripts/wxusfcsshow.js" type="text/javascript"></script>


<style type="text/css">
/* Slideshow */
.hidden {
 display: none;
 margin: auto;
}
.visible {
 display:  block;
 margin: auto;
}
.center{
 margin: auto;
}


</style>
<script type="text/javascript">
   window.onload=function(){show_tab2("d7tempfc")};
</script>
</head>
<body>


Unless I am missing something, it's the same. Not sure what I am missing.
I am going to need to change the tabs so they are more legible.
« Last Edit: January 29, 2017, 04:34:40 PM by jonnyj771 »
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline MackerelSky

  • Contributor
  • ***
  • Posts: 113
    • McKean County Weather, Smethport Pa.
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #28 on: January 29, 2017, 05:06:20 PM »
Here's what I mean Jon.

If I go to http://lightningweather.com/sl/index.php?p=USForecastPage&lang=en#data-area and right click the page, then on 'view-source' or however your browser is designed, you will see this in the head tag.

Code: [Select]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<script type="text/javascript" src="javaScripts/styleMenu.js"></script>
<meta name="description" content="US Forecasts - Lightning Weather" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="styleMain30.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="styleTable20.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="styleMenuVert20x.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="styleMood20.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="stylePrint20.css" media="print" />
<link rel="stylesheet" type="text/css" href="gauges/css/gauges-ss.css" />
<link rel="stylesheet" type="text/css" href="_my_texts/my_style.css" />
<link rel="stylesheet" type="text/css" href="style_lightbox.css" />
<link rel="icon" href="img/icon.png" type="image/x-icon" />
<meta name="Keywords" content="weather, Weather, temperature, dew point, humidity,
forecast, Davis VP2, State Line,  Weather, Lightning Weather, weather conditions,
live weather, live weather conditions, weather data, weather history, Weather Display " />
<title>US Forecasts - Lightning Weather</title>
<script type="text/javascript">
var docready=[],$=function(){return{ready:function(fn){docready.push(fn)}}};
</script>
</head>
<body class="ws_clouds">

That is your complete head tag and the opening tag for the body of your page. Nothing in there for Jerry's script.

While viewing the source, the part that should be in that head tag is located at line 218 or so in the <body> of the page. That's the part that should be in your head tag. Like I mentioned in my first response, you have an erroneous closing head tag that might make it look to you like it's in the head tag on lines 243/244
Code: [Select]
</head>
<body>

I'm sure someone else will come along that can explain it better than I can. *shrug*

Brad
Mckean County Weather
Located on upper Marvin Creek
https://mckeanweather.com/
Davis VP2 + fars
Cumulus 1.9.4-b1092

 

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #29 on: January 29, 2017, 05:38:48 PM »
Here's what I mean Jon.

If I go to http://lightningweather.com/sl/index.php?p=USForecastPage&lang=en#data-area and right click the page, then on 'view-source' or however your browser is designed, you will see this in the head tag.

Code: [Select]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<script type="text/javascript" src="javaScripts/styleMenu.js"></script>
<meta name="description" content="US Forecasts - Lightning Weather" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="styleMain30.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="styleTable20.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="styleMenuVert20x.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="styleMood20.css" media="all" title="screen" />
<link rel="stylesheet" type="text/css" href="stylePrint20.css" media="print" />
<link rel="stylesheet" type="text/css" href="gauges/css/gauges-ss.css" />
<link rel="stylesheet" type="text/css" href="_my_texts/my_style.css" />
<link rel="stylesheet" type="text/css" href="style_lightbox.css" />
<link rel="icon" href="img/icon.png" type="image/x-icon" />
<meta name="Keywords" content="weather, Weather, temperature, dew point, humidity,
forecast, Davis VP2, State Line,  Weather, Lightning Weather, weather conditions,
live weather, live weather conditions, weather data, weather history, Weather Display " />
<title>US Forecasts - Lightning Weather</title>
<script type="text/javascript">
var docready=[],$=function(){return{ready:function(fn){docready.push(fn)}}};
</script>
</head>
<body class="ws_clouds">

That is your complete head tag and the opening tag for the body of your page. Nothing in there for Jerry's script.

While viewing the source, the part that should be in that head tag is located at line 218 or so in the <body> of the page. That's the part that should be in your head tag. Like I mentioned in my first response, you have an erroneous closing head tag that might make it look to you like it's in the head tag on lines 243/244
Code: [Select]
</head>
<body>

I'm sure someone else will come along that can explain it better than I can. *shrug*

Brad
I'm just as confused as you are. The wsusfcsshow.php file doesn't go past line 201.


Sent from my SM-G935R4 using Tapatalk

Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #30 on: January 29, 2017, 06:18:46 PM »
Taking a look at your source does, in fact, show the </head><body> combo twice on your page, first at lines 25-26 and then again at lines 243-244. Also, https://validator.w3.org/nu/?doc=http%3A%2F%2Flightningweather.com%2Fsl%2Findex.php%3Fp%3DUSForecastPage%26lang%3Den shows 29 HTML errors for this page. The capture below shows the errors in red and in context to help you find them.
John
W7JKG

Offline MackerelSky

  • Contributor
  • ***
  • Posts: 113
    • McKean County Weather, Smethport Pa.
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #31 on: January 29, 2017, 06:34:17 PM »

I'm just as confused as you are. The wsusfcsshow.php file doesn't go past line 201.


Sent from my SM-G935R4 using Tapatalk

I'm not talking about the original php file, talking about the one currently on your website Jon. Open it in a browser, right click on it and 'view source'.

Brad
Mckean County Weather
Located on upper Marvin Creek
https://mckeanweather.com/
Davis VP2 + fars
Cumulus 1.9.4-b1092

 

 

anything