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:

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.

LVL 33
PowerEdgeTechIT ConsultantAsked:
Who is Participating?
GaryConnect With a Mentor Commented:
JSONP is what is used for cross domain ajax requests
What do you have now?
Are you using jQuery or vanilla js
PowerEdgeTechIT ConsultantAuthor Commented:
I was just using plain old JavaScript, using XMLHttpRequest().
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) :

similar question :
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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.

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...
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.
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.