Page 1 of 1

Get Temperature Into Javascript Variable?

Posted: Tue Sep 17, 2013 6:19 am
by robindean
I have a motorcycle blog. It's not just any motorcycle blog. It's THE SUPER-SLICK, ULTRA-BADASS MOTORCYCLE MEGA-BLOG (of incredible power).

No, really! Here's proof: http://tssubmmboip.blogspot.com/

Anyhow, I use YoWindow as a way to help riders pick their gear out for the day. We gotta stay safe but too cold is too cold and too hot is too hot.

I plan on devising a script that lists outfits based on the temperature. Right now, I have the entire list (scrollable) presented. I'd rather only show what is pertinent to the current temp.

Is there a way, via javascript, for me to get the temperature from YoWindow into a javascript variable?

Re: Get Temperature Into Javascript Variable?

Posted: Wed Sep 18, 2013 5:03 pm
by par
Dear Robin, YoWindow is just a presenter of the weather it takes from the internet.
We do not provide the weather, but rather take it from the weather providers.
I would suggest you to use existing current weather data providers to display the weather on your blog.
For example Open Weather Map
http://openweathermap.org/API

Re: Get Temperature Into Javascript Variable?

Posted: Wed Sep 18, 2013 5:42 pm
by robindean
So, your saying that your widget, which already has the data collected and presentable, doesn't allow for document.getElementById('yowindow').getVariable('current_temp'). Note that this is just a concept example.

Instead, even though your code has already done the work, I should use another script to do it again.

Already done.

Shame, though. Having to do the same thing twice is inefficient. Also, I'm already aware that you're not a weather service provider. I simply wanted to display outfit suggestions below your widget, which already displays the current temp clearly.

Oh well.

Re: Get Temperature Into Javascript Variable?

Posted: Wed Sep 18, 2013 8:43 pm
by par
But why don't you like the temperature displayed inside the widget?

Re: Get Temperature Into Javascript Variable?

Posted: Thu Sep 19, 2013 5:57 am
by robindean
At no point did I say I didn't like how the widget looks or how the information is presented. You assumed this. I simply requested a way to grab the temperature from the widget so that I may list out the appropriate riding gear to wear based on the weather.

Re: Get Temperature Into Javascript Variable?

Posted: Fri Sep 20, 2013 7:49 am
by par
Wow, that's a clever idea.
I think you are right, we need to make the temperature available outside the widget.
But this feature will take time to make.