Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Implement a Weather Summary
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Beano_ie
Junior Member

Ireland
328 Posts

Posted - 19 January 2005 :  13:35:17  Show Profile  Visit Beano_ie's Homepage  Send Beano_ie an ICQ Message
I bought a small application ($16) called Weather Tool 2.1 form here with the intention of setting the application up to show local weather in my town on a portal.asp page with one line of code
%> <!-- #include file="weather/currentconditions_small.asp" --><%


What I have done is created a folder(called weather) inside my forum folder and I've added all the weather files. Yo can view the set-up by going here. I have inside one of my portal pages the follwoing code...

%> <!--#Include file="weather/weatherclass.asp"--><%
%><!-- #include file="weather/currentconditions_small.asp" --><%


With the intention of displaying the weather data from the weather file onto the portal page.

The problem is that I get errors like this...

Name redefined

/forum/weather/weatherclass.asp, line 13

Dim Timerstart
----^

Is there a way around this problem. I'm guessing its something to do with declaring variables.

Guidance is much appreciated, as always

Weatherclass.txt file

Steve
Drogheda, Ireland @ www.droghedatown.com

Edited by - Beano_ie on 19 January 2005 16:22:06

dayve
Forum Moderator

USA
5820 Posts

Posted - 19 January 2005 :  14:36:03  Show Profile  Visit dayve's Homepage
all this simply means is that you have already declared Timestart early in your code. Just remove one of the instances, preferably the one later down in the code.

Go to Top of Page

Beano_ie
Junior Member

Ireland
328 Posts

Posted - 19 January 2005 :  16:21:46  Show Profile  Visit Beano_ie's Homepage  Send Beano_ie an ICQ Message
Sorry dayve but I still do not understand. The reason being is that if I comment out the declaring line, then the error is simply picked up on the next declaring line.

Example, if I comment out Dim Timerstart, then the next error occurs on the next Dim statement line. And if I comment that out, it goes onto the next Dim statement line. So I don't think the problem is directly with the variable Timerstart, the problem seems to be with declaring variables.

Steve
Drogheda, Ireland @ www.droghedatown.com
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 19 January 2005 :  16:58:22  Show Profile  Visit dayve's Homepage
This error is quite specific to repeated declared variables. Is there any chance that any of your other includes have these variables declared already?

BTW, you might want to check this out:

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=55689


Edited by - dayve on 19 January 2005 17:24:27
Go to Top of Page

Beano_ie
Junior Member

Ireland
328 Posts

Posted - 19 January 2005 :  17:48:51  Show Profile  Visit Beano_ie's Homepage  Send Beano_ie an ICQ Message
Thanks for your time dayve. I had already suspected they might be declared else where but they're not, very frustrating.

As for the link you provided, I read that a long time ago, had actually forgotten about it, the original problem with using weatherroom.com was that it only covers three cities in Ireland, whereas weather.com was more specific (loaction wise). I kind of bought this application to avoid messing with code(a headache), for obvious reasons such as this topic lol

Any other suggestions would be greatly appreciated.

Steve
Drogheda, Ireland @ www.droghedatown.com
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 19 January 2005 :  18:41:09  Show Profile  Visit dayve's Homepage
okay, we'll approach this the hard way then . can you provide a text link to the source code as well as all include files being used?

Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 19 January 2005 :  21:15:42  Show Profile
Do you have similar Dim's in any included files? Do you have any procedures with the same name as the variable you're trying to Dim?

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

Beano_ie
Junior Member

Ireland
328 Posts

Posted - 20 January 2005 :  09:07:03  Show Profile  Visit Beano_ie's Homepage  Send Beano_ie an ICQ Message
Dayve, zipped folder is edit - removed

Doug G, no there arent any Dims elsewhere, and the following are some of the procedures in the weatherclass.asp;

Function MakeWeather(ZipCode, TypeCD)
Function GetWeatherData(ZipCode, TypeCD)
Function CacheData(ByRef xmlDoc, ByVal fileName)

None of the procedures use the same name as the variables. I have to honestly say that I don't understand why I'm having an error. This application runs 100% when its on its own, yet when I try to display it in snitz, its just not working

Steve
Drogheda, Ireland @ www.droghedatown.com

Edited by - Beano_ie on 20 January 2005 11:04:39
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 20 January 2005 :  10:22:00  Show Profile
The currentconditions file has an include for weatherclass.asp. You have it included in your portal pages also by the looks of your example.

KawiForums.com


Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 20 January 2005 :  10:43:10  Show Profile  Visit dayve's Homepage
quote:
Originally posted by -gary

The currentconditions file has an include for weatherclass.asp. You have it included in your portal pages also by the looks of your example.


yup, which means the variables are being declared more than once.

BTW, looking at your source code and the example you showed, I feel this product you purchased is violating the Terms Of Agreement set out by Weather.com. I have an account with Weather.com and you need to use your own unique key and display and link the Weather.com logo (not just a text link).


Edited by - dayve on 20 January 2005 11:01:01
Go to Top of Page

Beano_ie
Junior Member

Ireland
328 Posts

Posted - 20 January 2005 :  11:07:49  Show Profile  Visit Beano_ie's Homepage  Send Beano_ie an ICQ Message
Ok, thanks for that, always helps to have a second/third pair of eyes to look at the code for such a prob

quote:
I feel this product you purchased is violating the Terms Of Agreement set out by Weather.com


After you purchase the application, you have to register with weather.com to receive your PartnerID and LicenseKey. There is also a link back provided with the display, I wasn;t aware however about displaying the weather.com logo. I'll have to look into this.

Thank you

Steve
Drogheda, Ireland @ www.droghedatown.com
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 20 January 2005 :  11:21:00  Show Profile  Visit dayve's Homepage
it's on Page 5 of the pdf guide they give you with the SDK.

quote:
Prominently display one of The Weather Channel/weather.com logos with the weather data. The logo must
link to http://www.weather.com with the correct “prod” and “par” query parameters.


quote:
7. Resources

The Weather XML Data Feed Software Developers Kit (SDK) includes logo and icon graphics for you to use in
your application. You must not modify the graphics in any way, except to convert them to a file format suitable for
your application.

7.1. Logos
You may use either of the images in the “logos” directory in accordance with Section 9 of this Guide and the
weather.com logo usage guide attached as Appendix A. The logos must link directly to the weather.com home page.
The logos are provided in two sizes:
- 32 x 43 PNG with transparent background
- 64 x 86 PNG with transparent background
The logo should link to:
http://www.weather.com/?prod=xoap&par=[partner_id]



they have an acceptable logo usage guide that also comes with the SDK. this was the main reason why I found another XML feed.


Edited by - dayve on 20 January 2005 11:23:39
Go to Top of Page

Beano_ie
Junior Member

Ireland
328 Posts

Posted - 20 January 2005 :  11:48:04  Show Profile  Visit Beano_ie's Homepage  Send Beano_ie an ICQ Message
quote:
Originally posted by dayve


they have an acceptable logo usage guide that also comes with the SDK.


Oh bugger , thats a bit annoying as this was never mentioned when purchasing the product. I found the product attractive simply because there was no logo, and I could live with one single line for a link back to weather.com. Very misleading

Thanks for your time Dayve


Steve
Drogheda, Ireland @ www.droghedatown.com

Edited by - Beano_ie on 20 January 2005 11:48:31
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07