cloudy

Author Topic: Javascript advisory scroll  (Read 31804 times)

0 Members and 1 Guest are viewing this topic.

Offline carterlake

  • Tom Chaplin
  • Posts: 2,273
  • Carter Lake, Iowa USA
    • Carter Lake, Iowa Weather
Re: Javascript advisory scroll
« Reply #15 on: March 01, 2005, 11:06:19 PM »
Updated and confirmed...
http://JaxWeather.net/WeatherImages/WD/wx9.html

I changed the color in the warning fields just as a sanity test for myself :)

Thanks carterlake and now if we can figure out how to get the "Right" warnings and alerts called by %NOAAEvent% the world will be good for a few moments :)

Thanks again,
Bob

Sanity test? Speaking of which.... I could SWEAR I checked both IE and Firefox.... are you using v1.01? Maybe that is what broke it... (Or I didn't do a final check).
« Last Edit: March 01, 2005, 11:07:50 PM by carterlake »

WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio

Offline JaxWeather

  • Bob
  • Global Moderator
  • Posts: 11,224
  • WML Station: WD00007
  • Jacksonville, Fl. USA
    • JaxWeather.net
Re: Javascript advisory scroll
« Reply #16 on: March 01, 2005, 11:15:49 PM »
I am running 1.0.1, the newest release, released a few days ago, 2/26/2005

ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0.1/win32/

so maybe that could be it ?

-Bob

Edit:  I thought I had typo'd   LOL  Look at this and note the year...
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0.1/   So I ain't the ONLY one :)
« Last Edit: March 01, 2005, 11:17:52 PM by JaxWeather »

Offline administrator

  • Administrator
  • Posts: 10,119
  • Get answers to your questions - use Forum SEARCH!
  • Blackpool, UK
    • Weather-Watch.com
Re: Javascript advisory scroll
« Reply #17 on: March 02, 2005, 06:30:29 AM »
location appears to be a reserved word in Javascript. See http://www.htmlite.com/JS015.php
Chris
Weather Forum Administrator

Offline TomTc

  • Posts: 400
  • Granada Hills, CA, USA
    • The Tcimpidis Weather Station
Re: Javascript advisory scroll
« Reply #18 on: March 02, 2005, 12:23:23 PM »
NOAA in my area uses "There are no active watches, warnings or advisories" to indicate that nothing is active and this seems to break the new WD code that is supposed to skip displaying warnings under such a condition...

Tom

Offline carterlake

  • Tom Chaplin
  • Posts: 2,273
  • Carter Lake, Iowa USA
    • Carter Lake, Iowa Weather
Re: Javascript advisory scroll
« Reply #19 on: March 06, 2005, 02:36:22 PM »
Through some testing, I added a minor bug fix for the situation of when a watch or warning is not in all upper case.

var warning = "%NOAAEvent%";

Becomes

var warning = "%NOAAEvent%".toUpperCase();


I also removed my duplicates of the "buggy" code and only have one version currently listed. It is the current version of code.

WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio

Offline carterlake

  • Tom Chaplin
  • Posts: 2,273
  • Carter Lake, Iowa USA
    • Carter Lake, Iowa Weather
Re: Javascript advisory scroll
« Reply #20 on: March 06, 2005, 02:48:40 PM »
Oh, I almost forgot.

For those who want to play around with the script in safety, just edit this test file and view it locally.

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

You just save this to your hard drive and open the test.html in a text editor (notepad) and change this line:

var warning = "CHANGE THIS TEXT WARNING".toUpperCase();  (To Watch, Warning, or Advisory)

And save. Then open in your web browser to view. I use it to play with font and background colors. I liked Jax Weather's white on dark red so well, I borrowed it for my site.

The key here is that only you are viewing it... and you really can't hurt anything if you screw something up.  #-o
« Last Edit: March 06, 2005, 02:50:31 PM by carterlake »

WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio

Offline carterlake

  • Tom Chaplin
  • Posts: 2,273
  • Carter Lake, Iowa USA
    • Carter Lake, Iowa Weather
Re: Javascript advisory scroll
« Reply #21 on: March 06, 2005, 02:53:12 PM »
Brian,

Maybe I missed something but what is the new version of your code supposed to do differently?  Here, the new version of 10.23C appears to handle the warning in exactly the same manner as the older versions did...

Tom


He added a tick for "show scrolling ticker". I haven't played around with it since well... I add mine myself.

WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio

Offline TomTc

  • Posts: 400
  • Granada Hills, CA, USA
    • The Tcimpidis Weather Station
Re: Javascript advisory scroll
« Reply #22 on: March 06, 2005, 03:07:23 PM »
I've tried it ticked and not ticked and don't notice any obvious difference here...  It still shows when I have no advisories...


He added a tick for "show scrolling ticker". I haven't played around with it since well... I add mine myself.
« Last Edit: March 09, 2005, 01:36:12 PM by Tom T »

Offline carterlake

  • Tom Chaplin
  • Posts: 2,273
  • Carter Lake, Iowa USA
    • Carter Lake, Iowa Weather
Re: Javascript advisory scroll
« Reply #23 on: March 06, 2005, 03:13:30 PM »
I've tried it ticked and not ticked and don't notice any obvious difference here...



The whole idea of the scroll is that you don't see it if there are no advisories... do you have any advisories?

WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio

Offline TomTc

  • Posts: 400
  • Granada Hills, CA, USA
    • The Tcimpidis Weather Station
Re: Javascript advisory scroll
« Reply #24 on: March 06, 2005, 03:16:18 PM »
No advisories are active currently but it still displays "There are no active watches, warnings or advisories"
« Last Edit: March 08, 2005, 01:15:12 PM by Tom T »

Offline JaxWeather

  • Bob
  • Global Moderator
  • Posts: 11,224
  • WML Station: WD00007
  • Jacksonville, Fl. USA
    • JaxWeather.net
Re: Javascript advisory scroll
« Reply #25 on: March 06, 2005, 03:30:07 PM »
No advisories but it still displays "There are no active watches, warnings or advisories"


That would appear to be the result of leaving some of the Manual Javascript scroll functions in place in the default wx.htm.

The code Tom developed is not manual, it doesn't have a visitor adjustable scrolling rate or stop and start buttons.  It simply appears if there is a Warning/watch and then disappears from the page when there are none.

Currently mine is displaying as we have a RED FLAG WARNING in place, but last night there were no Warnings and as a result the box and text simply didn't appear on the page...
http://JaxWeather.net/

I forget which datahtm.txt file the scroll code is in but if you want you can modify that code within your own WD to achieve similar results...

Tom, anything you see on my site you are welcome to snag, and if you have any questions about anything i have just holler and I will be happy to share :)

-Bob

Offline carterlake

  • Tom Chaplin
  • Posts: 2,273
  • Carter Lake, Iowa USA
    • Carter Lake, Iowa Weather
Re: Javascript advisory scroll
« Reply #26 on: March 06, 2005, 03:34:23 PM »
No advisories but it still displays "There are no active watches, warnings or advisories"

That's the Java version of the NOAA Warning showing...  :scratch:

Doesn't look like Brian gave any way to shut that off...  :pale:

WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio

Offline Weather Display

  • Posts: 64,521
Re: Javascript advisory scroll
« Reply #27 on: March 06, 2005, 03:54:10 PM »
what do i have to do?

Offline JaxWeather

  • Bob
  • Global Moderator
  • Posts: 11,224
  • WML Station: WD00007
  • Jacksonville, Fl. USA
    • JaxWeather.net
Re: Javascript advisory scroll
« Reply #28 on: March 06, 2005, 03:56:54 PM »
The code for the "Manual Scroller - Dynamic Drive 2201" appears to be in datahtm1.txt...

Couldn't you simply remove that code and add carterlake's javascript code ?

Not sure as I don't use the WD generated pages generally...

-Bob

Offline JaxWeather

  • Bob
  • Global Moderator
  • Posts: 11,224
  • WML Station: WD00007
  • Jacksonville, Fl. USA
    • JaxWeather.net
Re: Javascript advisory scroll
« Reply #29 on: March 06, 2005, 04:05:01 PM »
what do i have to do?

Brian, I am not sure you want to remove what is available now as some folks may like that...

If the datahtm1.txt file isn't editable then I am not sure what options there would be for those using the default pages.  If it is able to be edited then we need a FAQ on how to remove what is currently available and replace with Tom's code...

I am always hesitant to suggest changing something that isn't broke for the sake of better and newer as not everyone always agrees that Newer - Better is really better as they get used to certain things...

-Bob

 

cumulus