Weather API for Website

Ok, so I am trying to put a simple piece of weather information on a website, and I'm trying to use the WeatherBug API:

http://api-portal.earthnetworks.com/package/Bronze

I am running into problems that I found out are related to accessing an XML document from another domain.  

Can someone help me understand how to overcome this "cross-domain" issue and help me with the most basic code required to write the value of the current temperature to a webpage?

I'm most comfortable with JavaScript but can follow VB.NET code too, and I don't have a problem implementing another language (although it should be basic/simple - and no PHP).  Remember, the simplest code possible to accomplish this.

Thanks.
LVL 33
PowerEdgeTechIT ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
JSONP is what is used for cross domain ajax requests
What do you have now?
Are you using jQuery or vanilla js
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PowerEdgeTechIT ConsultantAuthor Commented:
I was just using plain old JavaScript, using XMLHttpRequest().
0
leakim971PluritechnicianCommented:
You need to build a proxy on your server (VB or C#)
The gaold of this proxy is to load the XML for your page, so your page and the proxy reside on the same domain. Instead calling the API from your page, you ask your proxy to call it for you AND return the data to your page.

A good article (don't forget to vote) : http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_3612-ASP-NET-Proxy-Page-Used-for-Cross-Domain-Requests-from-AJAX-and-JavaScript.html

similar question : http://www.experts-exchange.com/Programming/Languages/Scripting/AJAX/Q_26759864.html
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

PowerEdgeTechIT ConsultantAuthor Commented:
leakim ... I'm sorry - while I'm sure your method works, I'm not sure that falls in the classification of "simple", so I went with Gary's answer.  With that answer, while I would have appreciated a simple example of code rather than a Wiki link (hence the 'B' grade for only providing the name of the protocol necessary), researching JSONP got me started in the right direction.  I now have basic weather info on the website from WeatherBug.

Thanks.
0
leakim971PluritechnicianCommented:
You give a Grade "B" but you did not answered its question.
I'm 100% sure its question << Are you using jQuery or vanilla js >> was to provide you an example of code...
0
PowerEdgeTechIT ConsultantAuthor Commented:
"I'm 100% sure its question was to provide you an example of code"

Possibly, but I answered his question within 2 minutes, and after 3 days, I figured it wasn't coming.

Don't misunderstand - I did appreciate the answer - it ultimately got me to the solution.
0
GaryCommented:
leakim its fine.

I get hundreds of email a day from EE and sometimes the odd one slips thru.
Glad you got it worked out.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Services

From novice to tech pro — start learning today.