Ajnin
09-28-2006, 01:35 AM
Hey guys,
I'm using the following script to call the weather temperature and condition in the flash header of my site (52° Mostly Cloudy). When I test it out locally, it works perfect, but when I test it live on my site, the two fields show up as "undefined ° undefined."
Take a look at it and tell me what looks wrong, I would REALLY appreciate it.
myVars = new LoadVars();
myVars.load("http://mysite.com/includes/classes/weather.php");
myVars.temp;
myVars.forecast;
loadVariables("http://mysite.com/includes/classes/weather.php","");
myVars._path = this;
myVars.onLoad = function (success) {
if (success) {
//trace (" variables loaded ");
for( var prop in this ) {
//trace (" key " + prop + " = " + this[prop]);
}
} else {
//trace (" Error loading variables ");
}
}
myVars.onLoad = function() {
//display the values in the text box
lBox.text = this.temp + "° " + this.Forecast;
//trace(this.forecast);
}
I'm using the following script to call the weather temperature and condition in the flash header of my site (52° Mostly Cloudy). When I test it out locally, it works perfect, but when I test it live on my site, the two fields show up as "undefined ° undefined."
Take a look at it and tell me what looks wrong, I would REALLY appreciate it.
myVars = new LoadVars();
myVars.load("http://mysite.com/includes/classes/weather.php");
myVars.temp;
myVars.forecast;
loadVariables("http://mysite.com/includes/classes/weather.php","");
myVars._path = this;
myVars.onLoad = function (success) {
if (success) {
//trace (" variables loaded ");
for( var prop in this ) {
//trace (" key " + prop + " = " + this[prop]);
}
} else {
//trace (" Error loading variables ");
}
}
myVars.onLoad = function() {
//display the values in the text box
lBox.text = this.temp + "° " + this.Forecast;
//trace(this.forecast);
}