Page 1 of 1

view icon sun - cloud - nigth

Posted: Fri 10 May 2013 10:11 pm
by cbnidk
Hi

Has any one make this to also view a nigth icon when it is dark

<script>type="text/javascript">
sun = '<#isSunny>';
if (sun == '0') {sun = '<img src="images/sonne0.gif" width="80" align="center" border="0" height="85" hspace="10">';}
else {sun = '<img src="images/sonne1.gif" width="80" align="center" border="0" height="85" hspace="10">'};
document.write(sun);
</script>

and only view sun or clound through the day

Claus

Re: view icon sun - cloud - nigth

Posted: Sat 11 May 2013 3:37 am
by krmidas
I have icons that not only indicate the forecast, but also change based on whether it's day or night and whether it's freezing or not. I use the following naming format:

<#IsFreezing>_<#IsSunUp>_<#forecastnumber>.png

I have 108 forecast icons (many are duplicates since I don't have a separate icon for each of the 26 forecast states).

So my images are named "0_0_1.png", "0_0_2.png", etc. etc.

Hope this helps. You can see my forecast icons on the right side of my page: http://tomkeramidas.com/cumulus/index.htm

-Tom