Trixology

WeatherCat => WeatherCat Web Templates => Topic started by: Tailspin45 on June 16, 2013, 04:37:43 PM

Title: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: Tailspin45 on June 16, 2013, 04:37:43 PM
Running latest Saratoga scripts and V2.4.2 of Steel Gauges at http://www.carlsbadwx.com/wxgauges.php (http://www.carlsbadwx.com/wxgauges.php). (Full credits on 'About' page.)

Integrated the html into a PHP page (attached) and it works fine except the Fahrenheit/Centigrate radio buttons seem to be ignored.

If I load the page and select F, temps are okay; but after first reload it goes to C. If I select C, temps go to negative C values, if I select F they go to F but revert to C on next reload.

realtimeguageWC.txt has units and temp in F

Code: [Select]
"date":"17/06/13",
"timeUTC":"2013,6,17,14,23,22",
"SensorContactLost":"0",
"forecast":"Current forecast is -- Increasing clouds with little temperature change. --",
"tempunit":"°F",
"windunit":"MPH",
"pressunit":"inHg",
"rainunit":"in",
"temp":"61.7",


Spent several hours trying to debug this using ?debug=y and ?show=settings without success.

So, hat in hand, I'm here hoping someone can spot my problem.
Title: Re: Weird Steel Gauges glitch
Post by: UncleBuck on June 20, 2013, 01:21:30 AM
Not sure if this is the problem BUT I don't believe your gauges.js file should look like this.
Notice the strange character in the data.tempunit = , this could be what is causing your script to behave a bit odd as mine just has ?C and ?F

Code: [Select]
        setTempUnits = function (celcius) {
            if (celcius) {
                data.tempunit = '°C';
                _temp.sections = createTempSections(true);
                _temp.minValue = gauge.tempScaleDefMinC;
                _temp.maxValue = gauge.tempScaleDefMaxC;
                _dew.sections = createTempSections(true);
                _dew.minValue = gauge.tempScaleDefMinC;
                _dew.maxValue = gauge.tempScaleDefMaxC;
            } else {
                data.tempunit = '°F';
                _temp.sections = createTempSections(false);
                _temp.minValue = gauge.tempScaleDefMinF;
                _temp.maxValue = gauge.tempScaleDefMaxF;
                _dew.sections = createTempSections(false);
                _dew.minValue = gauge.tempScaleDefMinF;
                _dew.maxValue = gauge.tempScaleDefMaxF;
            }
[\code]
Title: Re: Weird Steel Gauges glitch
Post by: Tailspin45 on June 20, 2013, 01:46:37 AM
Thanks for the quick response, Colonel.

I saw that weird character on my gauges and assumed it was because the HTML character set was specified incorrectly.

But now, looking at gauges.js on the site with BBEDit, it don't see the character either! It only seems to show online.

Code: [Select]
setTempUnits = function (celcius) {
            if (celcius) {
                data.tempunit = '?C';
                _temp.sections = createTempSections(true);
                _temp.minValue = gauge.tempScaleDefMinC;
                _temp.maxValue = gauge.tempScaleDefMaxC;
                _dew.sections = createTempSections(true);
                _dew.minValue = gauge.tempScaleDefMinC;
                _dew.maxValue = gauge.tempScaleDefMaxC;
            } else {
                data.tempunit = '?F';
                _temp.sections = createTempSections(false);
                _temp.minValue = gauge.tempScaleDefMinF;
                _temp.maxValue = gauge.tempScaleDefMaxF;
                _dew.sections = createTempSections(false);
                _dew.minValue = gauge.tempScaleDefMinF;
                _dew.maxValue = gauge.tempScaleDefMaxF;

I wonder if the way I've embedded the code in the Saratoga PHP template page has done it? I'll look at the top.php and header.php files and see if there's a hint there.
Title: Re: Weird Steel Gauges glitch
Post by: mcrossley on June 20, 2013, 12:17:59 PM
Ken created an updated header PHP for the gauges that formats the page as HTML5 and UTF-8. I don't use his templates so I don't know the details, but you should investigate that.
Title: Re: Weird Steel Gauges glitch
Post by: Tailspin45 on June 21, 2013, 10:16:56 PM
Thanks Mark, I have installed all of Ken's new header files (and top.php, and common.php, etc).

I've gone back and made sure that all Ken's script are up to date, that I have latest version of the gauges, that WeatherCat is sending the right info (v1.2) and that everything is installed properly. But something is clearly out of whack.

The key symptom is that the UTF-8 functions are being ignored as evidenced by an ? (C3 85) before the temp gauge units. Everything else seems to work except the units radio-buttons selection are reset to Centigrade on each new data update. (Actually the buttons don't change, but the gauge display reverts to Centigrade).

I've tried to follow the process using Apple developer tools in Safari, but not being a developer I'm fascinated by, but ignorant of, what it's trying to tell me.

Oddly, the same problem occurs even with the included .htm file.
Title: Re: Weird Steel Gauges glitch
Post by: jf-i2r on June 22, 2013, 08:06:51 AM
very nice web site Tommy  [tup]

i use Saratoga template and gauges too

cheers
jean frederic
Title: Re: Weird Steel Gauges glitch
Post by: mcrossley on June 22, 2013, 07:00:10 PM
Tommy, your gauges page is still in xhtml format...
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Other Saratoga ss-gauges pages I look at at in html 5 format...
Code: [Select]
<!DOCTYPE html>
<html lang="en">

I think this is what Kens updates addressed - with dynamic UTF-8 on-the-fly conversion for the other existing ISO-8859-n translation files (.txt, .js)
Title: Re: Weird Steel Gauges glitch
Post by: Tailspin45 on June 22, 2013, 07:03:34 PM
Exactly, Mark. But for the life of me I can't figure out why it isn't using UTF-8. I have all of Ken's updates, installed and re-installed, and tried his wxssgauges.php page but it shows the same thing.
Title: Re: Weird Steel Gauges glitch
Post by: Tailspin45 on June 22, 2013, 07:19:39 PM
FIXED!

I went back through everything and verified the files are where they should be, everything was properly customized. But everything looked right, and I didn't change a thing.

So I loaded up Ken's wxssgauges.php just make sure what I said in my previous message about his page not working was true -- BUT IT WORKED!

WTF, says I. Guess I better check my page against his. Identical.

So I looked at my page... AND IT WORKED!

I have no explanation. Super moon, karma, just holding my tongue right, perhaps?

Anyway I'm happy now, and I appreciate everyone's contribution.

You know the saying, "I'd rather be lucky than good?" Seems to apply here. I warned you this was weird.

And I'm gonna smack the next person that tells me computers and software are deterministic.
Title: Re: FIXED (by magic): Weird Steel Gauges glitch
Post by: mcrossley on June 22, 2013, 09:40:25 PM
Hmm, your page still doesn't work for me :( ?
Title: Re: FIXED (by magic): Weird Steel Gauges glitch
Post by: Tailspin45 on June 22, 2013, 09:43:45 PM
Cached page? Still works fine here.
Title: Re: FIXED (by magic): Weird Steel Gauges glitch
Post by: ELO on June 23, 2013, 12:54:07 AM
I hate to say it, but it's not fixed for me either... I've attached a screenshot of what I'm seeing as of 4:43pm. I hit my browser refresh several times to assure I wasn't using a cached page to no avail. Tried it in both Chrome & Safari.

Heck if I know what's going on for you. I don't use the Saratoga templates on my site, but the gauges themselves work just fine (wx.oshlo.net). Somewhere there is a mismatch between the ?F and ?C settings in addition to the "A" character on the two gauge faces themselves. Have you tried completely re-downloading a fresh set of Mark's Steel Gauges files, making the few needed Weathercat and file location changes and then uploading the full new set of scripts to your site? I'm just shooting in the dark here...

Rick
Title: Re: FIXED (by magic): Weird Steel Gauges glitch
Post by: Tailspin45 on June 23, 2013, 02:41:10 AM
...Have you tried completely re-downloading a fresh set of Mark's Steel Gauges files, making the few needed Weathercat and file location changes and then uploading the full new set of scripts to your site? I'm just shooting in the dark here...

Dang, another one! Yes, I've downloaded and installed the Steel Gauges and Ken's files several times.

What perplexes me now is that I see them working fine and you don't!

Gadzooks, there's spooks!
Title: Re: FIXED (by magic)...OR NOT: Weird Steel Gauges glitch
Post by: Tailspin45 on June 23, 2013, 03:04:19 AM
So I tried it in Crome and Firefox. Both broken. Trash cache, reload, quit and restart. Doesn't work.

Safari? Works great. Trash cache, reload, quit and restart...works great.


 [banghead]
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 23, 2013, 01:50:55 PM
Well, this morning mine doesn't work either.

Checked weather before I went to bed, gauges worked great.

 [bed]

Came in this morning and they behave as before, showing Centigrade when Fahrenheit is selected and showing the ? character.
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: jf-i2r on June 24, 2013, 09:14:52 AM
hi

i think saratoga template is not the problem
same problem with direct link

http://carlsbadwx.com/gauges-ss-basic.htm

strange that:

(http://img819.imageshack.us/img819/597/k1lj.jpg) (http://imageshack.us/photo/my-images/819/k1lj.jpg/)

can you try my gauges.js


cheers
jean frederic
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 24, 2013, 01:22:39 PM
Yours work fine, Jean, temp displays in C but converts to F with radio button. Also the popup graph is in C, as it should be.

Mine display in C, convert to F for one cycle, then revert to C. Graph is in Fahrenheit, even though default gauge, set to F, displays C.
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: wurzelmac on June 25, 2013, 10:52:22 AM
In line 449, 450, 451 it reads in your gauges.js as follows:
Code: [Select]
                // temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '°' + _displayUnits.temp;

whereas it looks in my gauges.js :
Code: [Select]
                // temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '?' + _displayUnits.temp;

So for what reason ever you have built in this strange "?" into your code, just delete it and you should go fine. *Maybe* this one helps. ;-)

Cheers,
Reinhard
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 25, 2013, 01:42:30 PM
I wish I could removed the ?, Reinhart, But this is what the file looks like when I try to edit it with BBEDit:

Code: [Select]
// temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '?' + _displayUnits.temp;

I think you're seeing the ? because the page isn't being displayed as UTF-8, so the ? is translated to ?.

Why it isn't using UTF-8 seems to be the crux of the matter.

But thank you anyway for the help! [cheers1]
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: jf-i2r on June 25, 2013, 02:48:59 PM
hi

if using http://carlsbadwx.com/gauges-ss-basic.htm  you can't see the Ã…

(http://img194.imageshack.us/img194/3631/gbx2.jpg) (http://imageshack.us/photo/my-images/194/gbx2.jpg/)

if using http://carlsbadwx.com/wxgauges.php i see the Ã…

(http://img195.imageshack.us/img195/9350/q7dl.jpg) (http://imageshack.us/photo/my-images/195/q7dl.jpg/)

perhaps a code problem in wxgauges.php

cheers  [cheers1]
jean frederic
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: wurzelmac on June 25, 2013, 05:35:37 PM
Very strange, indeed. At this very time (it shows 18:30 CEST) I can see your pages correct (screenshot attached). Even the source code of your gauges.js is correct now:
Code: [Select]
                // temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '?' + _displayUnits.temp;

Cheers,
Reinhard
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 25, 2013, 05:40:28 PM
Very strange! I didn't change a thing!

I had a similar situation where I thought the problem was magically solved, but then it came back.

And now, when I look at the site, it's broken.

Perhaps the page itself is okay, but somehow the update breaks it?I

'll investigate that angle (as if I knew how).
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: ELO on June 25, 2013, 09:15:48 PM
Obviously, we are all fumbling around in the dark on this; nevertheless, I likewise see the problem when looking at your http://carlsbadwx.com/wxgauges.php page, but not when I look at your http://carlsbadwx.com/gauges-ss-basic.htm page. It appears these two pages are using the identical gauges.js and other script files. I pulled down a copy of your gauges.js file and ran a comparison to mine using TextWrangler with no non preference differences found.

So if you also see the temp gauges working on your gauges-ss-basic.htm page and not on the wxgauges.php page, and it's repeatable, it would seem the issue has to be somewhere in the wxgauges.php file - how it is ordered, or something I can't see or don't understand.

Note also on the misbehaving page, not only are the temp gauges displaying ?C, but the two gauges are showing different scales. The raw temp gauge is showing 0-100, which is correct for ?F, while the other them gauge is using 0-40, which is the default ?C scale.

BTW, I do see the ?A in the gauges.js file when I look at it in Chrome, but not when I download and look at it in TextWrangler. I presume you do have the gauges.js file uploaded permanently to your site and the "realtimegaugesWC.txt" is the only file being processed and uploaded by WeatherCat.

Again, just shooting in the dark, you might consider paring down the files in your /steel directory to just those needed for the WeatherCat configuration just to be sure something there isn't causing the issue. [banghead]

Rick
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 26, 2013, 01:51:09 AM
So if you also see the temp gauges working on your gauges-ss-basic.htm page and not on the wxgauges.php page, and it's repeatable, it would seem the issue has to be somewhere in the wxgauges.php file - how it is ordered, or something I can't see or don't understand.

The html page works...sometimes. I just visited it and it seemed to work, so I slowly switched back and forth from C to F a number of times and at one point I had C selected with the radio button but F was displayed. I let it go through several update cycles and it remained with C selected and F showing. But never saw the problem I have whewrre the update reverts an F select to C display.

Note also on the misbehaving page, not only are the temp gauges displaying ?C, but the two gauges are showing different scales. The raw temp gauge is showing 0-100, which is correct for ?F, while the other them gauge is using 0-40, which is the default ?C scale.

Yes, I see that on wxgauges.php too, but hadn't noticed it before although it probably was like that and I just didn't notice.

BTW, I do see the ?A in the gauges.js file when I look at it in Chrome, but not when I download and look at it in TextWrangler. I presume you do have the gauges.js file uploaded permanently to your site and the "realtimegaugesWC.txt" is the only file being processed and uploaded by WeatherCat.

Yes, gauges.js is on the site. realtimeguagesWC.txt and WCT_realtime.txt are being uploaded by WeatherCat

Again, just shooting in the dark, you might consider paring down the files in your /steel directory to just those needed for the WeatherCat configuration just to be sure something there isn't causing the issue.

Excellent idea. The only things in my /steel folder now are the css, images and scripts folder (with the included src folder). No joy, it behaves the same.

Here's my wxgauges.php file if anyone has the time and inclination to eyeball it. I sure hope it something stupid like an extra space or misplaced semicolon! ::)

Code: [Select]
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
#
#   Project:    Sample Included Website Design
#   Module:     sample.php
#   Purpose:    Sample Page
#   Authors:    Kevin W. Reed <kreed@tnet.com>
#               TNET Services, Inc.
#
Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once(
"common.php");
############################################################################
$TITLE langtransstr($SITE['organ']) . " - " .langtransstr('Live Gauges');
$showGizmo true;  // set to false to exclude the gizmo
include("top.php");
############################################################################
?>


<link rel="stylesheet" href="/steel/css/gauges-ss.css">


<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>


<script src="/steel/scripts/steelseries_tween.min.js"></script>
<script src="/steel/scripts/language.min.js"></script>
<script src="/steel/scripts/gauges.js"></script>
<script src="/steel/scripts/windrose.js"></script>
<script src="/steel/scripts/RGraph.common.core.min.js"></script>
<script src="/steel/scripts/RGraph.rose.min.js"></script>


</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>


<div id="main-copy">

<div align="center">
<noscript>
<h2 style="color:red; text-align:center">
&gt;&gt;This pages requires JavaScript enabling in your browser.&lt;&lt;
<br>
&gt;&gt;Please enable scripting it to enjoy this site at its best.&lt;&lt;
</h2>
</noscript>
<center>Mouse over gauge to see chart of last 24 hours.</center><Br /> <br />
<div class="row">
<canvas id="canvas_led" width="25" height="25">
</canvas>
&nbsp;&nbsp;&nbsp;
<canvas id="canvas_status" width="350" height="25">
</canvas>
&nbsp;&nbsp;
<canvas id="canvas_timer" width="70" height="25">
</canvas>
</div>
<div class="row">
<div class="gauge">
<div id="tip_0">
<canvas id="canvas_temp" class="gaugeSizeSml">
</canvas>
</div>
<input id="rad_temp1" type="radio" name="rad_temp" value="out" checked onclick="gauges.doTemp(this);">
<label id="lab_temp1" for="rad_temp1">
Outside
</label>
<input id="rad_temp2" type="radio" name="rad_temp" value="in" onclick="gauges.doTemp(this);">
<label id="lab_temp2" for="rad_temp2">
Inside
</label>
</div>
<div class="gauge">
<div id="tip_1">
<canvas id="canvas_dew" class="gaugeSizeSml">
</canvas>
</div>
<input id="rad_dew1" type="radio" name="rad_dew" value="dew" onclick="gauges.doDew(this);">
<label id="lab_dew1" for="rad_dew1">
Dew Point
</label>
<input id="rad_dew2" type="radio" name="rad_dew" value="app" checked onclick="gauges.doDew(this);">
<label id="lab_dew2" for="rad_dew2">
Apparent
</label>
<br>
<input id="rad_dew3" type="radio" name="rad_dew" value="wnd" onclick="gauges.doDew(this);">
<label id="lab_dew3" for="rad_dew3">
Wind Chill
</label>
<input id="rad_dew4" type="radio" name="rad_dew" value="hea" onclick="gauges.doDew(this);">
<label id="lab_dew4" for="rad_dew4">
Heat Index
</label>
<br>
<input id="rad_dew5" type="radio" name="rad_dew" value="hum" onclick="gauges.doDew(this);">
<label id="lab_dew5" for="rad_dew5">
Humidex
</label>
</div>
<div class="gauge">
<div id="tip_4">
<canvas id="canvas_hum" class="gaugeSizeSml">
</canvas>
</div>
<input id="rad_hum1" type="radio" name="rad_hum" value="out" checked onclick="gauges.doHum(this);">
<label id="lab_hum1" for="rad_hum1">
Outside
</label>
<input id="rad_hum2" type="radio" name="rad_hum" value="in" onclick="gauges.doHum(this);">
<label id="lab_hum2" for="rad_hum2">
Inside
</label>
</div>
</div>
<div class="row">
<div id="tip_6" class="gauge">
<canvas id="canvas_wind" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_7" class="gauge">
<canvas id="canvas_dir" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_10" class="gauge">
<canvas id="canvas_rose" class="gaugeSizeSml">
</canvas>
</div>
</div>
<div class="row">
<div id="tip_5" class="gauge">
<canvas id="canvas_baro" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_2" class="gauge">
<canvas id="canvas_rain" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_3" class="gauge">
<canvas id="canvas_rrate" class="gaugeSizeSml">
</canvas>
</div>
</div>
<div class="row">
<div id="tip_8" class="gauge">
<canvas id="canvas_uv" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_9" class="gauge">
<canvas id="canvas_solar" class="gaugeSizeSml">
</canvas>
</div>
</div>
<div class="unitsTable">
<div style="display:table-row">
<div id="temperature" class="cellRight">
<span id="lang_temperature">
Temperature</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsTemp1" type="radio" name="rad_unitsTemp" value="C" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsTemp1" for="rad_unitsTemp1">
&deg;C
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsTemp2" type="radio" name="rad_unitsTemp" value="F" onclick="gauges.setUnits(this);">
<label id="lab_unitsTemp2" for="rad_unitsTemp2">
&deg;F
</label>
</div>
</div>
<div style="display:table-row">
<div id="rainfall" class="cellRight">
<span id="lang_rainfall">
Rainfall</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsRain1" type="radio" name="rad_unitsRain" value="mm" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsRain1" for="rad_unitsRain1">
mm
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsRain2" type="radio" name="rad_unitsRain" value="in" onclick="gauges.setUnits(this);">
<label id="lab_unitsRain2" for="rad_unitsRain2">
Inch
</label>
</div>
</div>
<div style="display:table-row">
<div id="pressure" class="cellRight">
<span id="lang_pressure">
Pressure</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsPress1" type="radio" name="rad_unitsPress" value="hPa" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsPress1" for="rad_unitsPress1">
hPa
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsPress2" type="radio" name="rad_unitsPress" value="inHg" onclick="gauges.setUnits(this);">
<label id="lab_unitsPress2" for="rad_unitsPress2">
inHg
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsPress3" type="radio" name="rad_unitsPress" value="mb" onclick="gauges.setUnits(this);">
<label id="lab_unitsPress3" for="rad_unitsPress3">
mb
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsPress4" type="radio" name="rad_unitsPress" value="kPa" onclick="gauges.setUnits(this);">
<label id="lab_unitsPress4" for="rad_unitsPress4">
kPa
</label>
</div>
</div>
<div style="display:table-row">
<div id="wind" class="cellRight">
<span id="lang_windSpeed">
Wind Speed</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsWind4" type="radio" name="rad_unitsWind" value="km/h" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsWind4" for="rad_unitsWind4">
km/h
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsWind3" type="radio" name="rad_unitsWind" value="m/s" onclick="gauges.setUnits(this);">
<label id="lab_unitsWind3" for="rad_unitsWind3">
m/s
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsWind1" type="radio" name="rad_unitsWind" value="mph" onclick="gauges.setUnits(this);">
<label id="lab_unitsWind1" for="rad_unitsWind1">
mph
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsWind2" type="radio" name="rad_unitsWind" value="kts" onclick="gauges.setUnits(this);">
<label id="lab_unitsWind2" for="rad_unitsWind2">
knots
</label>
</div>
</div>
</div>

# Extensive credits on my wxabout.php page

    </div>
</div><!-- end main-copy -->

<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: ELO on June 26, 2013, 02:03:16 AM
I'm not familiar with the WCT_realtime.txt file. It's certainly not one used by the steel gauges scripts. I presume it must be for the Saratoga templates or something else you are running. I can't see why that would cause any conflict though..

The mystery continues I guess... Obviously, there has to be an explanation. It's just a matter of finding someone smart enough to spot it.

Rick
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 26, 2013, 01:29:36 PM
Yes, WCT_realtime.txt is used to update AJAX in the Saratoga scripts.

I tried not FTPing it, for no logical reason, but it didn't fix the problem.
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: jf-i2r on June 26, 2013, 01:38:42 PM
hi

for me , weathercat and saratogata need some patches

http://athena.trixology.com/index.php?topic=158.30


Quote
hi Ken and Weathercat team

with a friend we have made some patches in ajaxWCTwx.js  ; now your template is ok (comma,date, update, gust etc.. ) when using weathercat fr , kts  : http://www.jf-i2r.com

we use Dreamweaver => cmd+f  BugsDenis

Quote
      //   BugsDenis patches here
        var value = new String(inValue);
        if(decimalComma) value = value.replace(/(\d)\.(\d)/,"$1,$2");
Quote
              // convert input wind to knots if need be
   if(rawwind == '-') {rawwind = 0.0;}   //   Patch BugsDenis
Quote
             //   BugsDenis patches here
   if (useKnots) { return new Number((rawwind * 1.0).toFixed(dpWind)); } //force usage of knots for speed
Quote
         //   BugsDenis patches here in order to see received datas

//Wind gust
      //   BugsDenis patches here (on JF directives)
      // var gust    = convertWind(realtime[40]);
      var gust    = convertWind(realtime[6]);

Quote
//   BugsDenis patches here in order to identify errors
      console.log(e);
   console.log(rttext);

cheers
jean frederic
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: mcrossley on June 26, 2013, 05:58:04 PM
I've said it before, the reason for the 'corruption' is because your Saratoga page is loading as XHTM 1.0 Transitional, with a character set of ISO-8859-1.

The SteelSeries gauges require the page the HTML5 and a character set of UTF-8 (the default for HTML5). Until you get your Saratoga template updated to present the correct HTML5 I do not think you will find a solution to this.

The supplied 'basic' page is HTML5/UTF-8 that is why it displays correctly.
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 26, 2013, 08:26:07 PM
I know the problem is because the Saratoga page is loading XHTM not UTF-8. My Saratoga templates are updated, but the problem still exists.

I'm running WeatherCat 1.2, SteelGuages 2.4.2. and have downloaded and installed all the latest Saratoga scripts (top.php, header.php, common.php, etc.). I've read and re-read the related posts and followed the 15 page development thread. I've compared, line by line, my wxgauges.php page with the html versions and other php versions and can't find a difference.

 [banghead]




Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: mcrossley on June 27, 2013, 10:20:39 AM
It's in there somewhere :)

Have you tried pinging Ken to take a look?
Title: Re: (NOT) FIXED : Weird Steel Gauges glitch
Post by: Tailspin45 on June 28, 2013, 01:03:12 PM
Yes, about a week ago I sent a support email via his site but haven't heard back. He must be out of town.

Will a try it again in a few days.

Thanks for your continued concern/interest.
Title: Re: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: Tailspin45 on June 30, 2013, 02:26:26 PM
Ken kindly weighed in, asked me to check that the common, top, header, footer, etc files were up to date and they were.

He asked if wxssgauges worked, and it did. Always has. And that suggests that my wxgauges was the issue. However I used my editor to do a file comparison and they were identical. And I checked that several times.

Then it hit me.

I've been comparing wxssgauges.php against my wxgauge.php file on my local system not on the Web site.

Uploaded it to my ISP and everything works. Duh.

As I wrote to Ken, somehow stupidity is worse than carelessness. :-[
Title: Re: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: mcrossley on July 01, 2013, 09:27:07 AM
I'm glad you got it fixed in the end, sorry, but I do not know much about how Ken's templates work.
Title: Re: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: monymony on September 20, 2013, 06:18:10 PM
Just wondering if you ever got this to work on your local website?  I am still working on my website using the templates and currently only have them installed on my Mac which I using to host the pages until I am ready to go online to the internet.  Anyway I having the exact problem but I too cannot see any files that have not been updates.  As I have only started working on the templates in the past two weeks I know there are not any old versions here.  I am wondering if maybe it has something to do with how the Mac is handling the code. 

Let me know if you have any thoughts/advise.
Title: Re: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: Tailspin45 on September 20, 2013, 06:23:28 PM
Everything worked as advertised, monymony. The only problem was self-inflicted.

If you're running on localhost be sure your pages aren't be cached by whatever browser(s) you're using.

Whenever I'm doing web development caching always seems to bite me at some point..
Title: Re: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: monymony on September 20, 2013, 07:47:40 PM
Thanks.. I am sure I have something self-inflicted here too.  Now to find what it is.  Oh well, I was hoping for something simple.

Jay
Title: Re: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: Tailspin45 on September 20, 2013, 08:05:32 PM
Oh, don't worry, it's always something obvious and simple! [banghead]
Title: Re: FIXED : Weird Steel Gauges problem (I'm stupid)
Post by: monymony on September 21, 2013, 02:17:17 PM
Thanks... I did get this to work but still have no idea what I had wrong.  I ended up downloaded the wxgauges.php file that is available for Cumulus and a few other programs (odd there is no WeatherCat version) and started over using that file as a base.  Worked like a charm and now I am not going to touch it ever again!  :)

Thanks again!

Jay