$(function(){ load_gmap(); get_newest(65356); $('#area,#pref,#spot,#hstr').change(function(){ $($(this).parent())[0].submit();}); $('#chart_wrap').html($('').attr({'src':'chart.png?spot=65356'})); setTimeout(bg, 5000); }); function get_newest(spot_id){ setTimeout(function(){ $.ajax({ dataType: "html", cache: false, url: 'ajax/get_newest.php?spot='+spot_id, success: function(r){ //console.log(r) $('#chart_rslt').html(r); } }); }, 3000); } function bg(){ $('#chart_wrap').css("background-image","none"); } function get_relimg(q){ //alert(q); $.ajax({ dataType: "html", cache: false, url: 'ajax/get_relimg.php?q='+q, success: function(r){ //console.log(r) $('#img_rel').html(r); } }); } //window.onunload = GUnload();