Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does anybody know how to do this?

Status
Not open for further replies.

Jerkycold

IS-IT--Management
Jun 17, 2003
26
US
I am trying to find out how to display the actual image, instead of the path to it? here is the code:

<!-- #include virtual=&quot;./includes/header2.asp&quot; --><%
LocationID = Request.Form(&quot;zipcode&quot;)

Set Weather = Server.CreateObject(&quot;S3Weather.Current&quot;)

Weather.CompanyName = &quot;Pacific&quot;
Weather.RegistrationKey = &quot;DEFWQ:O5C2K:MN618:V92AU&quot;
Weather.DesktopEmail = &quot;brii@cox.net&quot;
Weather.DesktopPassword = &quot;b&quot;
Weather.UseCelsius = False

ErrorNumber = Weather.GetWeather(LocationID)

If ErrorNumber = 0 Then
%>
<link href=&quot;file://///Pacific/Inetpub/ rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>

<blockquote>
<pre>
Barometer: <%= Weather.Barometer %>
BarometerDirection: <%= Weather.BarometerDirection %>
City: <%= Weather.City %>
FeelsLike: <%= Weather.FeelsLike %>
Forecast: <%= Weather.Forecast %>
Humidity: <%= Weather.Humidity %>
ImageID: <%= Weather.ImageID %>
ImageSmall: <%= Weather.ImageSmall %>
ImageBig: <%= Weather.ImageBig %>
ImageOldAnimated: <%= Weather.ImageOldAnimated %>
ImageOldTrans: <%= Weather.ImageOldTrans %>
Precipitation: <%= Weather.Precipitation %>
Reported: <%= Weather.Reported %>
State: <%= Weather.State %>
Sunrise: <%= Weather.Sunrise %>
Sunset: <%= Weather.Sunset %>
Temperature: <%= Weather.Temperature %>
TemperatureLow: <%= Weather.TemperatureLow %>
TemperatureHigh: <%= Weather.TemperatureHigh %>
WeatherAlert: <%= Weather.WeatherAlert %>
WeatherAlertText: <%= Weather.WeatherAlertText %>
WeatherAlertLink: <%= Weather.WeatherAlertLink %>
Wind: <%= Weather.Wind %>
WindSpeed: <%= Weather.WindSpeed %>
WindDirection: <%= Weather.WindDirection %>
</pre>
</blockquote>
<%
Else
%>
<pre>
The following error information produced:
<br>
Error Number: <%= ErrorNumber %>
Error Message: <%= Weather.ErrorMessage %>
</pre>
<%
End If

Set Weather = Nothing
%>


The output looks like this:

Barometer: 29.92
BarometerDirection: steady
City: Mission Viejo
FeelsLike: 93
Forecast: Fair
Humidity: 31
ImageID: 34
ImageSmall: ImageBig: Precipitation: 0
Reported: 6/30/03 2:53 PM PDT as reported at Chino, CA
State: CA
Sunrise: 5:44 AM
Sunset: 8:05 PM
Temperature: 93
TemperatureLow: 59
TemperatureHigh: N/A
WeatherAlert: False
WeatherAlertText: N/A
WeatherAlertLink: N/A
Wind: From the West Northwest at 14
WindSpeed: 14
WindDirection: WNW





I want lines 8 and 9 to be the actual image and not the path to the image. If anyone can help I would really appreciate it. I tried doing it like the website suggested but I could not get it to work. Here is what they gave me:

Set objWeather = Server.CreateObject(&quot;S3Weather.Current&quot;)
objWeather.CompanyName = &quot;Company Name&quot;
objWeather.RegistrationKey = &quot;Registration Key&quot;
objWeather.UseCelsius = False
ErrorResponse = objWeather.GetWeather(&quot;90210&quot;)
If ErrorResponse = 0 Then
‘No error has occurred
WeatherImage = objWeather.ImageSmall
Response.Write(“<img src=&quot;&quot;&quot; & WeatherImage & &quot;&quot;&quot;>&quot;)
Else
‘An error has occurred
End If
Set objWeather = Nothing
 
You just need to write out the appropriate HTML. Replace this:
Code:
ImageSmall: <%= Weather.ImageSmall %>
ImageBig:   <%= Weather.ImageBig %>
with this:
Code:
ImageSmall: <img src=&quot;<%= Weather.ImageSmall %>&quot;>
ImageBig:   <img src=&quot;<%= Weather.ImageBig %>&quot;>
 
Jerky,

Today I signed up for this S3Weather service and I cannot get it to work. I get the Error #4, nothing usable was returned from server.

Is it still functioning for you? (the current class)

Thanks!
-Matt
 
Hey Matt,
It is not working because changes were made to weather.com. They are currently working to fix this. You can go to the website and enter your email address to be notified when the changes are made.

Thanks,
Jerky
 
Jerky,

On their website it says all three classes EXCEPT &quot;Current&quot; are disabled. So Current should still work. I just received an email from them confirming this. So yours stopped working?

-Matt
 
Hey Matt,
Thats weird cause mine has not been working for days now.
 
Agreed.

I imagine they were mistaken when they emailed me that it should be working. It looks like all 4 classes are broken.

-Matt
 
Matt,
go to the website and download the software again. All you have to do is copy the bin file from the website to the location of your old bin file. I got mine working again by doing this.

Thanks,
Jerky
 
by default it installs to here:

C:\Program Files\SoftShell Solutions\S3Weather

If you download it and reinstall it, it will write over the old one, but it will also write over the asp samples, so if you made any changes to them I would advise you to move them somewhere first then install S3weather.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top