Skip to main content

Hiding yahoo.weather widget

2 replies [Last post]
salmonroe
Offline
Joined: 2008-03-19

I'm specifying a weather widget:

<?php
addWidget( array ( "name" => "yahoo.weather")
);
?>

I see in the component.js code that it's possible to hide the UI - and just call getForecast() in the background, but it's not clear to me how to specify that in the php.

if(typeof wargs.args.shown != 'hidden') {
shown = wargs.args.shown;
}

Does anyone know how to specify the hidden mode in php? =)

Thanks,
David

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
carlavmott
Offline
Joined: 2005-02-10

From the code you have it looks like it would be the following:

addWidget( array ( "name" => "yahoo.weather"
"args" => "{shown: 'hidden'}")
);
?>

I just looked at the code in 1.1 and I don't see the same code that you show below. This only sets whether the getForcast form is visible in the widget. Let me know what version of jMaki you are using and if you got this to work.

carla

salmonroe
Offline
Joined: 2008-03-19

carla,
I ended up doing
addWidget( array ( "name" => "yahoo.weather", "args" => array("shown" => "hidden"))
);
?>
which seemed alright. The jMaki version that got installed with NetBeans is '1.0.4'. Now I'm another odd behavior where the yahoo.weather forecast returns malformed text on the production server. The first few bytes of the string is cut off: " {"data": { " is missing at the beginning of the response text, so the subsequent parse fails. (The response from the proxy can be seen at ( http://www.duanewong.com/XmlHttpProxy.php?id=yahooweather&urlparams=p%3D... ) However, running on my local computer using xampp works ok. Is there an update in XmlHttpProxy in jMaki 1.1 that may have addressed this issue?

Thanks for any direction! :-)

-David