function loadContests() { $(".stationinfo").empty(); $(".searchinfo").empty(); $.ajax({ url: base_url+'index.php/cabrillo/getContests', type: 'post', data: {'year': $("#year").val()}, success: function (data) { $(".contestname").append('
Select contest:
' + '' + ' '); $.each(data, function(key, value) { $('#contestid') .append($("") .attr("value",value.col_contest_id) .text(value.col_contest_id)); }); } }); } function loadContestDates() { $.ajax({ url: base_url+'index.php/cabrillo/getContestDates', type: 'post', data: {'year': $("#year").val(), 'contestid': $("#contestid").val()}, success: function (data) { $(".contestdates").append('
Select daterange:
' + '' + ' '); $.each(data, function(key, value) { $('#contestdates') .append($("") .attr("value", value.mindate + ',' + value.maxdate) .text(value.mindate + ' - ' + value.maxdate)); }); } }); }