yql - Passing Data from variable to JSONP call -



yql - Passing Data from variable to JSONP call -

i using yql gather weather info yahoo, yet having problem in passing parameters endpoint. seems trivial task various methods i've tried have seemed fall short.

<script> //to gather users response var form = document.queryselector("form"); form.addeventlistener("submit", function(event) { var userzip = form.elements.value.value; event.preventdefault(); form.reset(); }); </script> <script> //makes request yql weather conditions var callbackfunction = function(data) { var status = data.query.results.channel.item.condition; var description = data.query.results.channel.item.condition; var location = data.query.results.channel.location; var currenttemperature = ("current conditions for" + " " + location.city + "," + " " + location.region + ":" + " " + condition.temp + " " + "degrees" + " " + "and" + " " + description.text); //document.getelementbyid("temperature").innerhtml = currenttemperature; alert(currenttemperature); }; </script> <script src="https://query.yahooapis.com/v1/public/yql?q=select * weather.forecast woeid=2367105&format=json&callback=callbackfunction"></script>

essentially, need able accomplish pass info stored in userzip portion of endpoint wherewoeid=" " yet amendments create endpoint seem break call. quite new this, help appreciated.

jsonp yql

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -