The weather object is an easy way to display weather on your site or in your web application with just a few steps.
Currently, the weather object supports all major localities.
You can implement the weather on your web pages without the fear of slowing it down. This component utilizes very high-speed data fetching through XML.
This component also has error trapping to prevent script errors in the event weather data is unavailable.
Object Name: XIIO.Weather
LocalityType ("ZIPCODE" or "OTHER")
When using ZIPCODE, Set the following properties:
LocalityType = "ZIPCODE"
ZipCode = "yourzip"
When using OTHER, Set the following properties:
LocalityType = "OTHER"
CountryCode = "XX" (2 character country code)
StateCode = "XX" (2 character state code)
City = "City" (Full name of city")
Connect() - Connect using the above properties
CurrentConditions() - Retrieve current Temp and Conditions
ForecartToday() - Retrieve today's forecast
ForecastTommorow() - Retrieve tomorrow's forecast
ErrorCode = Error code 22 means the object could not retrieve weather because the location is incorrect or no data is available for that location.
[View Sample ASP (Vbscript) Code] [Download Code as Text File]
[Online Demo of above code]