Author Topic: Modified WU-radar.php  (Read 862 times)

0 Members and 1 Guest are viewing this topic.

Offline AZClipper

  • Member
  • *
  • Posts: 17
Modified WU-radar.php
« on: September 06, 2019, 04:27:20 PM »
I've recently redone Ken's script for my own use. You can see it in use at  www.apachejctwx.com/MiniWeb/PHP/WU-radar.php. It is stand alone capable. I've attached a copy here if anyone would like to try it out.

Latest version can always be found here.
« Last Edit: September 19, 2019, 06:40:37 PM by AZClipper »


John

Online the beteljuice

  • the beteljuice
  • Senior Contributor
  • ****
  • Posts: 201
    • test site
Re: Modified WU-radar.php
« Reply #1 on: September 06, 2019, 08:36:25 PM »
You have a problem with the way the code for the 'zoom' is formed ....
Code: [Select]
<a href="/MiniWeb/PHP/WU-radar.php?mode=2&amp;track=0onmouseover="rollThis('pic1','./ajax-images/radar1a.gif')" onmouseout="rollThis('pic1','./ajax-images/radar1.gif')"><img src="./ajax-images/radar1.gif" alt="Zoom In" title="Zoom In" width="24" height="28" name="pic1" border="0"/></a>&nbsp;
<a href="/MiniWeb/PHP/WU-radar.php?mode=1&amp;track=0onmouseover="rollThis('pic2','./ajax-images/radar2a.gif')" onmouseout="rollThis('pic2','./ajax-images/radar2.gif')"><img alt="Apache Junction" title="Apache Junction" src='./ajax-images/radar2.gif' width="24" height="28" name="pic2" border="0"/></a>&nbsp;
<a href="/MiniWeb/PHP/WU-radar.php?mode=2&amp;track=0onmouseover="rollThis('pic3','./ajax-images/radar3a.gif')" onmouseout="rollThis('pic3','./ajax-images/radar3.gif')"><img src='./ajax-images/radar3.gif' alt="Phoenix" title="Phoenix" width="24" height="28" name="pic3" border="0"/></a>
<a href="/MiniWeb/PHP/WU-radar.php?mode=3&amp;track=0onmouseover="rollThis('pic4','./ajax-images/radar4a.gif')" onmouseout="rollThis('pic4','./ajax-images/radar4a.gif')"><img alt="Phoenix Area" title="Phoenix Area" src='./ajax-images/radar4a.gif' width="24" height="28" name="pic4" border="0"/></a>
<a href="/MiniWeb/PHP/WU-radar.php?mode=4&amp;track=0onmouseover="rollThis('pic5','./ajax-images/radar5a.gif')" onmouseout="rollThis('pic5','./ajax-images/radar5.gif')"><img alt="Southwest US" title="Southwest US" src='./ajax-images/radar5.gif' width="24" height="28" name="pic5" border="0"/></a>

<a href="/MiniWeb/PHP/WU-radar.php?mode=5&amp;track=0onmouseover="rollThis('pic6','./ajax-images/radar6a.gif')" onmouseout="rollThis('pic6','./ajax-images/radar6.gif')"><img alt="Entire US" title="Entire US" src='./ajax-images/radar6.gif' width="24" height="28" name="pic6" border="0"/></a>

<a href="/MiniWeb/PHP/WU-radar.php?mode=4&amp;track=0onmouseover="rollThis('pic7','./ajax-images/radar7a.gif')" onmouseout="rollThis('pic7','./ajax-images/radar7.gif')"><img alt="Zoom Out" title="Zoom Out" src="./ajax-images/radar7.gif" width="29" height="28" name="pic7" border="0"/></a>

<a href="/MiniWeb/PHP/WU-radar.php?mode=3&amp;track=1" style="text-decoration:none"><span style="font-size: 14px; font-family: Arial, Helvetica, sans-serif; color:#FFFFFF" onmouseover="this.style.color = '#FFFF00'" onmouseout="this.style.color = '#FFFFFF'">Storm Track: OFF</span></a>&nbsp;&nbsp;
The url is crashing into the javascript ...
Imagine what you will KNOW tomorrow !

Offline AZClipper

  • Member
  • *
  • Posts: 17
Re: Modified WU-radar.php
« Reply #2 on: September 07, 2019, 11:18:07 AM »
OOps1 Fprgot to include the javascript. See new attachment.
« Last Edit: September 08, 2019, 09:27:18 AM by AZClipper »


John

Offline AZClipper

  • Member
  • *
  • Posts: 17
Re: Modified WU-radar.php
« Reply #3 on: September 07, 2019, 12:53:57 PM »
Sorry. I'm new at this. Forgot the images in the zip file. Maybe the third try will finally get it.
« Last Edit: September 08, 2019, 09:27:40 AM by AZClipper »


John

Online the beteljuice

  • the beteljuice
  • Senior Contributor
  • ****
  • Posts: 201
    • test site
Re: Modified WU-radar.php
« Reply #4 on: September 07, 2019, 04:00:30 PM »
You still have the 'link format' problem for the << in your page ..
Imagine what you will KNOW tomorrow !

Offline AZClipper

  • Member
  • *
  • Posts: 17
Re: Modified WU-radar.php
« Reply #5 on: September 07, 2019, 05:49:19 PM »
Well I'm here to learn so..
Quote
The url is crashing into the javascript ...
This code is from Ken's original script.
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=<?php echo $ModeMinus; ?>&amp;animated=<?php echo $Animated; ?>&amp;track=<?php echo $Track; ?>&amp;advisories=<?php echo $Advisories; ?>&amp;lightning=<?php echo $Lightning; ?>&amp;national=<?php echo $National; ?>#WUtop" onmouseover="rollThis('pic1','<?php echo $imagesDir; ?>radar1a.gif')" onmouseout="rollThis('pic1','<?php echo $imagesDir; ?>radar1.gif')"><img src="<?php echo $imagesDir; ?>radar1.gif" alt="Zoom In" title="Zoom In" width="24" height="28" name="pic1" border="0"/></a>&nbsp;

<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=1&amp;animated=<?php echo $Animated; ?>&amp;track=<?php echo $Track; ?>&amp;advisories=<?php echo $Advisories; ?>&amp;lightning=<?php echo $Lightning; ?>&amp;national=<?php echo $National; ?>#WUtop" onmouseover="rollThis('pic2','<?php echo $imagesDir; ?>radar2a.gif')" onmouseout="rollThis('pic2',<?php echo $mode1HL;?>)"><img alt="<?php echo $WUname1; ?>" title="<?php echo $WUname1; ?>" src=<?php echo $mode1HL;?> width="24" height="28" name="pic2" border="0"/></a>&nbsp;

This is the code after my modification. I removed the parts in red as being of no use to me.
<a href="<?php echo $PHP_SELF; ?>?mode=<?php echo $ModeMinus; ?>&amp;track=<?php echo $Track; ?>onmouseover="rollThis('pic1','<?php echo $imagesDir; ?>radar1a.gif')" onmouseout="rollThis('pic1','<?php echo $imagesDir; ?>radar1.gif')"><img src="<?php echo $imagesDir; ?>radar1.gif" alt="Zoom In" title="Zoom In" width="24" height="28" name="pic1" border="0"/></a>&nbsp;

<a href="<?php echo $PHP_SELF; ?>?mode=1&amp;track=<?php echo $Track; ?>onmouseover="rollThis('pic2','<?php echo $imagesDir; ?>radar2a.gif')" onmouseout="rollThis('pic2',<?php echo $mode1HL;?>)"><img alt="<?php echo $WUname1; ?>" title="<?php echo $WUname1; ?>" src=<?php echo $mode1HL;?> width="24" height="28" name="pic2" border="0"/></a>&nbsp;

This is the Javascript.
<script>
function rollThis(whichImage,whichPic){
document.images[whichImage].src = whichPic;
}
</script>

Honestly I cannot find a problem and don't see an issue on my site. I am willing to learn. Perhaps a little more verbose explanation of what you're seeing may help me track it down.


John

Online the beteljuice

  • the beteljuice
  • Senior Contributor
  • ****
  • Posts: 201
    • test site
Re: Modified WU-radar.php
« Reply #6 on: September 07, 2019, 09:19:56 PM »
Quote from: you
This is the code after my modification. I removed the parts in red as being of no use to me.

<a href="<?php echo $PHP_SELF; ?>?mode=<?php echo $ModeMinus; ?>&amp;track=<?php echo $Track; ?>" onmouseover="rollThis('pic1','<?php echo $imagesDir; ?>radar1a.gif')" onmouseout="rollThis('pic1','<?php echo $imagesDir; ?>radar1.gif')"><img src="<?php echo $imagesDir; ?>radar1.gif" alt="Zoom In" title="Zoom In" width="24" height="28" name="pic1" border="0"/></a>&nbsp;

<a href="<?php echo $PHP_SELF; ?>?mode=1&amp;track=<?php echo $Track; ?>" onmouseover="rollThis('pic2','<?php echo $imagesDir; ?>radar2a.gif')" onmouseout="rollThis('pic2',<?php echo $mode1HL;?>)"><img alt="<?php echo $WUname1; ?>" title="<?php echo $WUname1; ?>" src=<?php echo $mode1HL;?> width="24" height="28" name="pic2" border="0"/></a>&nbsp;
Note: There is a space after "

As posted earlier, your 'stitch' resulted in :
<a href="/MiniWeb/PHP/WU-radar.php?mode=2&amp;track=0onmouseover="rollThis('

... rather than:
<a href="/MiniWeb/PHP/WU-radar.php?mode=2&amp;track=0" onmouseover="rollThis('
« Last Edit: September 07, 2019, 09:21:54 PM by the beteljuice »
Imagine what you will KNOW tomorrow !

Offline AZClipper

  • Member
  • *
  • Posts: 17
Re: Modified WU-radar.php
« Reply #7 on: September 08, 2019, 01:38:29 AM »
Thank You! Thank You! I must have went through that code fifty times and never saw that. One of the things that threw me was that there were no error messages of any kind. I've corrected the code and attached it again to the first post. Without your help I might have been blissfully unaware for ages. Thank you again.
« Last Edit: September 08, 2019, 09:32:04 AM by AZClipper »


John

Online the beteljuice

  • the beteljuice
  • Senior Contributor
  • ****
  • Posts: 201
    • test site
Re: Modified WU-radar.php
« Reply #8 on: September 08, 2019, 07:40:38 AM »
Not a problem ... the beteljuice wishes he could 'sixth sense' his own typos / syntax errors as easily  :???:

Tip:
Edit all your previous posts and remove redundant zips.

Put the latest zip in the first post, and any updates just post and say it's 'there'  ;)
Imagine what you will KNOW tomorrow !

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 325
    • Penn Lake Weather
Re: Modified WU-radar.php
« Reply #9 on: September 09, 2019, 03:18:42 PM »
Is it there in the first post, or is that still the old zip?

Offline AZClipper

  • Member
  • *
  • Posts: 17
Re: Modified WU-radar.php
« Reply #10 on: September 09, 2019, 03:38:11 PM »
Latest zip is in first post.


John

Offline AZClipper

  • Member
  • *
  • Posts: 17
Re: Modified WU-radar.php
« Reply #11 on: September 19, 2019, 06:44:05 PM »
Version 2.1 -  Reworked for new WU radar urls and region codes.  Should be smooth until WU starts playing again. Latest version in first post.


John

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2422
  • Space Academy for Educators
    • Robbinsdale Middle School Weather
Re: Modified WU-radar.php
« Reply #12 on: September 19, 2019, 07:23:40 PM »
this is great. Thank you ......

Hopefully I can put it in next week.
« Last Edit: September 19, 2019, 07:27:38 PM by chief-david »
Vantage Pro Plus 6163
Robbinsdale, MN 55422@ 45 degrees North Latitude.

You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2422
  • Space Academy for Educators
    • Robbinsdale Middle School Weather
Re: Modified WU-radar.php
« Reply #13 on: February 23, 2020, 04:30:49 PM »
finally done.

All looks fine except I still have a southwest map on the regional radar.

nope-got it.... anything else-let me know

« Last Edit: February 23, 2020, 07:36:54 PM by chief-david »
Vantage Pro Plus 6163
Robbinsdale, MN 55422@ 45 degrees North Latitude.

You can't phase me-I teach Middle School.
It's not you-It's WU.