How to return javascript results to jquery -
i have problem returning results javascript json. armature @ programming, please forgive lack of understanding. ok...i try best explain doing atm.
i have jquery function passes "farmid" variable on event "onclick" "asp" script. here function..
scripturl = "urlpath/weatherrainfall.asp?farmid="+farmid; $.ajax({ type: "get", url: scripturl, datatype: "text", async: false, success: function(returnval){ document.getelementbyid('obs').innerhtml = returnval; });the asp script runs postgis "st_distance" query find closest weather station farm.
the closest weather "station id" passed on jquery getjson.
$(document).ready(function() { $.getjson('bomproxy.asp?url=http://www.bom.gov.au/fwo/idv60801/idv60801.'+wmo+'.json', function(json) {the json results passed "highcharts api" draw chart weather station.
the problem: chart not show chart in 'obs' div expected in step 1, shows return "loading" html not hightchart javascript. if load "asp" page... weatherrainfall.asp?farmid="+farmid script on own...i works fine!. doing wrong in jquery? how better?
$.getjson json object, if asp page returning chart when go on own, should using $.ajax instead.
and on unrelated personal note, should learn asp.net, mere fact people still use asp makes me die inside.
Comments
Post a Comment