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.

  1. 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; }); 
  2. the asp script runs postgis "st_distance" query find closest weather station farm.

  3. 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) { 
  4. 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

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -