Posted By

flexyournoggin on 12/01/10


Tagged

js ee comboboxes


Versions (?)

js comboboxes


 / Published in: JavaScript
 

  1. // Top Box
  2. $('#blogcategory').change( function() {
  3. //alert('this is yelling');
  4. var val = $('#blogcategory').attr('value');
  5. // alert ('val test' + val);
  6. $.getJSON('http://staging.tickettoride.org/js/comboboxes.php?q=' + val, function(json){
  7. // alert(json[0].cat_id); // <h1>Program Overview</h1><h1>January 29, 2009</h1>
  8. // alert(json[0].cat_name); // "Management Services"
  9. // alert(json[0].cat_url_title); // "1"
  10. $("#destination_point").css("display","block");
  11. $("#destination_point").html("<option value='' selected='selected'>--- Choose your destination ---</option>");
  12. $("#destination_point").append("<option value='" + json[0].cat_id + "'>" + json[0].cat_name + "</option>");
  13. $("#destination_point").fadeIn("slow");
  14. });
  15.  
  16. });

Report this snippet  

You need to login to post a comment.