Weather-Watch.com
March 17, 2010, 02:58:53 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Members: 9,388  Posts: 346,811  Topics: 38,450
Please welcome elsie, our newest member.

Latest versions: WD - 10.37P  WDL - 6.05  MML - 1.03
 News:
Check out the new FAQs (Frequently Asked Questions) board for a growing list of hints, tips and diagnostic suggestions.
  Advanced Search
   Home   Bug Tracker Photo Gallery Wiki Chat Calendar Search Login Register Help  
Pages: [1] 2 3
  Print  |  « previous  |  next »  |  Go Down  
Author Topic: Javascript Lightning Thread  (Read 16016 times)
0 Members and 1 Guest are viewing this topic.
carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« on: March 09, 2005, 11:14:01 PM »

Basic idea behind this javascript:

1) Alert web users that lightning is in the area.
2) Highlight the fact that this site HAS a lightning detector
3) Not show this when it's clear and sunny outside  d'oh!

Here's the current version of the code:

<script type="text/javascript">
<!--
var strikes = %lighteningcountlasthour%;
var link = "http://www.noaa.gov/lightning.html";
var lightbgcolor = "#000000";
var lightfontcolor = "#FFFF33";
if (strikes > 0) {
document.write("<table border=0 cellpadding=0 width=100 height=95 bgcolor='" + lightbgcolor + "' background='lightning.gif' cellspacing=0><tr><td valign=top><center><a href='" + link + "' STYLE='text-decoration:none'><font face='verdana,arial' color='" + lightfontcolor + "' size='7'>%lighteningcountlasthour%</font><br><font face='verdana,arial' color='" + lightfontcolor + "' size='1'>Lightning strikes last hour</font></a></center></td></tr></table>");
}
//-->
</script>

Here's the test page:

http://members.cox.net/carterlakeweather/test2.html

And the graphic for the javascript:

http://members.cox.net/carterlakeweather/lightning.gif

My other thought was to make a very small graphic which can be displayed on a page if lightning has been detected in the past hour? 30 minutes? to draw visitors to the lightning page and also alert that lightning is in the area. I've been thinking of using the image below with some text like "LightingRETURNAlert" (but maybe Kevin can whip something up... thinking very small.)

http://members.cox.net/carterlakeweather/bolt.gif

Thoughts? Suggestions? Comments?

Tom
« Last Edit: March 12, 2005, 06:33:05 PM by carterlake » Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
JaxWeather
Bob
Senior Weather Controller
*
Offline Offline

Location: Jacksonville, Fl. USA
Station Type: Vantage Pro 2 w/ FARS + 1-wire Lightning - Logitech Pro 5000
Posts: 10,129
Local Time: Tuesday 22:58


MML Station: WD00007


WWW
« Reply #1 on: March 09, 2005, 11:32:37 PM »

Tom,

Once again Thank You  wow Smile

I have already snatched this and have it set up... Will have to wait for some stuff BUT it gave me at least an idea how to link and display, http://www.jaxweather.net/WeatherImages/WD/lighteninggraph.gif...  I will post more on that when ready Wink

Outstanding Smile

-Bob
Logged

carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« Reply #2 on: March 10, 2005, 12:52:46 AM »

Hey cool. Now I'll be muttering that I want some storm weather in Florida and my wife will really think I'm crazy.  Laughing
Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
JaxWeather
Bob
Senior Weather Controller
*
Offline Offline

Location: Jacksonville, Fl. USA
Station Type: Vantage Pro 2 w/ FARS + 1-wire Lightning - Logitech Pro 5000
Posts: 10,129
Local Time: Tuesday 22:58


MML Station: WD00007


WWW
« Reply #3 on: March 10, 2005, 01:00:12 AM »

This will be the link...
http://www.JaxWeather.net/Lightning.php

And if not real soon summer isn't far off and then we will see some action LOL

-Bob
Logged

carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« Reply #4 on: March 10, 2005, 03:10:18 AM »


Which tag is time of last strike?

I added a second script:

<script type="text/javascript">
<!--
var strikes = %lighteningcountlast30minutes%;
var link = "http://www.noaa.gov/lightning.html";
if (strikes > 0) {
document.write("<a href='" + link + "'><img src='lightningalert.gif' alt='Lightning Alert' border='0' height='25' width='72'></a>");
}
//-->
</script>

http://members.cox.net/carterlakeweather/test2.html

And the graphic:

http://members.cox.net/carterlakeweather/lightningalert.gif

This is a graphic that pops up if there is a strike in the last 30 minutes... I figure this one will go on pages other than my main.
« Last Edit: March 10, 2005, 03:12:23 AM by carterlake » Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
JaxWeather
Bob
Senior Weather Controller
*
Offline Offline

Location: Jacksonville, Fl. USA
Station Type: Vantage Pro 2 w/ FARS + 1-wire Lightning - Logitech Pro 5000
Posts: 10,129
Local Time: Tuesday 22:58


MML Station: WD00007


WWW
« Reply #5 on: March 10, 2005, 03:19:07 AM »

Ohhh I like that Lightning Alert...

The tags I am aware of are:
Lightning counts
================
%lighteningcountlasthour%...Lightening count last immediate hour
%lighteningcountlastminute%...Lightening count last minute
%lighteningcountlast12hour% ..Lightening count last 12 hours
%lighteningcountlast30minutes% ..Lightening count last 30 minutes

A "windy birdie" also just whispered that a Full 10.23d with another new tag for  "new lightning 5 minute" as well as a fix for the javascript scroller should be available soon Smile

Hmmm I really like that Lightning Alert and have to think how I am gonna lay this out now  LOL

-Bob
Logged

carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« Reply #6 on: March 10, 2005, 03:21:12 AM »

Ohhh I like that Lightning Alert...

The tags I am aware of are:

Oh, silly me. That's a graphic. I thought it was text.
Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« Reply #7 on: March 13, 2005, 01:24:38 PM »

Hey Bob,

Eric tells me the detector will ship Monday  Sad

So I've been playing while I'm waiting.... what do you think?

I've changed the script a bit to make the box just a bit smaller and include the lightning alert image and a bit wider so it fits with my format.

I've been thinking of altering the NOAA scroll to include lightning info as well....
« Last Edit: October 24, 2005, 01:43:51 AM by carterlake » Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
JaxWeather
Bob
Senior Weather Controller
*
Offline Offline

Location: Jacksonville, Fl. USA
Station Type: Vantage Pro 2 w/ FARS + 1-wire Lightning - Logitech Pro 5000
Posts: 10,129
Local Time: Tuesday 22:58


MML Station: WD00007


WWW
« Reply #8 on: March 13, 2005, 01:33:04 PM »

Dynamite... Smile

It does look better and when you get all done playing just point me towards where i can Ummm... Borrow all these scripts Wink

We have a possibility for some unsettled weather coming up starting Tuesday this week and there should be the possibility for some Thunder Boomers with it and maybe I will get some more action as a result.

Will keep you posted on that.

I wouldn't mind having the lightning alert incorporated with the "custom scroller" script (versus the WD now official one Wink ).

Anyway you write the scripts and i will be only too happy to test them Smile

Still looking for some way to add "Lightning Enabled" to my site just to alert folks that lightning data is available from the site when storms are present.  Also talked to Brian about adding more historical tags for lightning (when he comes back from his Big Trip)

Thanks,
Bob
Logged

carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« Reply #9 on: March 13, 2005, 03:05:14 PM »

Dynamite... Smile

It does look better and when you get all done playing just point me towards where i can Ummm... Borrow all these scripts Wink

We have a possibility for some unsettled weather coming up starting Tuesday this week and there should be the possibility for some Thunder Boomers with it and maybe I will get some more action as a result.

Will keep you posted on that.

I wouldn't mind having the lightning alert incorporated with the "custom scroller" script (versus the WD now official one Wink ).

Anyway you write the scripts and i will be only too happy to test them Smile

Still looking for some way to add "Lightning Enabled" to my site just to alert folks that lightning data is available from the site when storms are present.  Also talked to Brian about adding more historical tags for lightning (when he comes back from his Big Trip)

Thanks,
Bob

No problem. Will let you know.

I'd like to put in a request for "time of last strike"... and also "strikes today" (since midnight) but no urgency.

I'm still working on overlaying the lightning graphic onto lightning graph... I'm having trouble getting an image to lay on top of an image (like text on the radar page).... hum... I'm missing something.
Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
JaxWeather
Bob
Senior Weather Controller
*
Offline Offline

Location: Jacksonville, Fl. USA
Station Type: Vantage Pro 2 w/ FARS + 1-wire Lightning - Logitech Pro 5000
Posts: 10,129
Local Time: Tuesday 22:58


MML Station: WD00007


WWW
« Reply #10 on: March 13, 2005, 03:27:34 PM »

No problem. Will let you know.

I'd like to put in a request for "time of last strike"... and also "strikes today" (since midnight) but no urgency.

Just thinking outloud here... Wink
%lighteningcountmonth% <== already exists
%lighteningcount% <== "since noon" already exists
%lighteningcountlasthour% <== already exists
%lighteningcountlastminute% <== already exists
%lighteningcountlast5minutes% <== already exists
%lighteningcountlast30minutes%  <== already exists

WIBNI:
%lighteningcountlastdate%
%lighteningcountlasttime%
%lighteningcounttoday% "since midnight"

I believe I also mentioned at one point it would be nice to have some sort of archive ability, whether images or tags...  so we could look back at past year for lightning counts...

As I mentioned "Just thunking outloud here" Wink

-Bob
Logged

carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« Reply #11 on: March 13, 2005, 04:55:26 PM »

Judging by the number of people visiting but not clicking through... I need to add some sort of click through identification.
Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
JaxWeather
Bob
Senior Weather Controller
*
Offline Offline

Location: Jacksonville, Fl. USA
Station Type: Vantage Pro 2 w/ FARS + 1-wire Lightning - Logitech Pro 5000
Posts: 10,129
Local Time: Tuesday 22:58


MML Station: WD00007


WWW
« Reply #12 on: March 14, 2005, 02:04:36 AM »

Hey Tom...

I found this by accident tonight...  Not sure if there is anything you (we) can use specifically but lots of good information...

This is where I started:
http://ghrc.nsstc.nasa.gov/browse/surface/lightning/gif-inst/

Ended up here:
http://thunder.nsstc.nasa.gov/

-Bob
Logged

JaxWeather
Bob
Senior Weather Controller
*
Offline Offline

Location: Jacksonville, Fl. USA
Station Type: Vantage Pro 2 w/ FARS + 1-wire Lightning - Logitech Pro 5000
Posts: 10,129
Local Time: Tuesday 22:58


MML Station: WD00007


WWW
« Reply #13 on: March 14, 2005, 11:04:07 PM »

Well so far today has been a bust...

Keeping an eye here:
http://www.flamedia.com/lightning/light.htm

One time today the "stroke per minute" was up to 157... But anything near me  Nooooooooooooooo

Central Florida, north of FL - GA border all over the place but nary a hit anywhere within 50 - 75 miles of me all day Sad

May still have some opportunities this evening until about 11 Pm local, and then more chances Tomorrow afternoon - evening and Wednesday...

Will let you all know Smile

-Bob
Logged

carterlake
Tom Chaplin
Junior Weather Controller
****
Offline Offline

Location: Carter Lake, Iowa USA
Posts: 2,274
Local Time: Tuesday 21:58



WWW
« Reply #14 on: March 14, 2005, 11:06:02 PM »

I've been watching you too.... even sneaking a peek during work.

(And hey, Eric finally got me notification the board is shipping... should have it up by this weekend.)
Logged


WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio
Pages: [1] 2 3
  Print  |  « previous  |  next »  |  Go Up  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!