[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Embed text weather condition and temp for zip using Javascript / Ajax

Posted on 2009-02-22
5
Medium Priority
?
468 Views
Last Modified: 2012-05-06
I was wondering if anyone knew of a javascript code sniplet that I could feed a zip code too and it would spit back out the weather condition and temp in plain text format that I could then style using css
what I want is to feed it something like a zip and it return "sunny 65" or something along those lines that I could then style to match my site
0
Comment
Question by:BTMExpert
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:QuestionManA
ID: 23707339
Wunderground.com and weather.com offer something similar.

http://www.weather.com/services/oap.html

or for a more customized solution try:
http://wiki.wunderground.com/index.php/API_-_XML
0
 

Author Comment

by:BTMExpert
ID: 23707649
something like that second option would work
but I have no idea on how to implement that using javascript or ajax

the first option wouldn't work because I want just the text of the temp and condition no graphics or anything
0
 
LVL 2

Expert Comment

by:QuestionManA
ID: 23710430
Perhaps some of these would help point you in the right direction on how to consume the xml service.

http://www.developer.com/net/asp/article.php/3657826
http://msdn.microsoft.com/en-us/library/ms173022(VS.80).aspx
http://www.codeproject.com/KB/dotnet/MyXamlWeather.aspx (inclusdes source code)

FYI NOAA also has an xml feed. Ther pages contains more information on the feed and it's use than wunderground.com.

Take a Look: http://www.nws.noaa.gov/xml/#use_it

0
 

Author Comment

by:BTMExpert
ID: 23711529
is it even possible to load and use this in Javascript?
0
 

Accepted Solution

by:
BTMExpert earned 0 total points
ID: 24018718
I found the solution myself by using jquery to load an xml file and pull it apart
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month18 days, 15 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question