javascript - Displaying Ajax Sample Results as the Form Loads -


i've set box display results ajax form, showing water data geological survey , using google chart. works great, want users see sample results when first load form instead of empty box. not sure how it. here's code form:

<table bgcolor="tan" width="480px" height="450px"><tr><td> <h2>current river levels</h2></td><td> <form> <select name="users"; onchange="showuser(this.value); drawchart(this.value)";> <option value="01598500">north branch @ luke, md</option> <option value="01603000">north branch @ cumberland, md</option> <option value="01610000">potomac river @ paw paw, wv</option> <option value="01613000">potomac river @ hancock, md</option> <option value="01619500">antietam creek @ sharpsburg, md</option> <option value="01638500">potomac river @ point of rocks, md</option> <option value="01648000">rock creek @ sherrill drive, dc</option> <option value="01646500">little falls, dc</option> </select> </form></td></tr><td colspan="2"> <div id="placeholder"></div> <div id="placeholder2"></div>##  <div id="chart" style="width:100%"></div> <div id="txthint"><b>select site or visit our <a href="../monitoring_map.php4" target="_blank">interactive map.</a></b></div> 

the entire project located here: http://www.riverexplorer.com/potomax/json_test_20.php

trigger onchange event when document ready.

$(function(){     $('select[name="users"]').trigger('change');  }); 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -