I am trying to load the option tags generated by back-end into my select tag when changes are made to either of 2 fields.
Here is the code for front end:
<select id="Events"> </select>
and this is the jQuery:
$(document).ready(function() {
$("#Dept").on('change', function() {
var dept = $("#Dept").val();
var isTech = $(".isTech").val();
$("#Events").load("/assets/scripts/Events.php?dept=" + dept + "&istech=" + isTech);
});
$(".isTech").on('change', function() {
var dept = $("#Dept").val();
var isTech = $(".isTech").val();
$("#Events").load("/assets/scripts/Events.php?dept=" + dept + "&istech=" + isTech);
});
});
This is not loading any tags, though I checked via URL and the back end is producing required output of option tag(s):
<option value="56">spray ball</option>
I have checked the back-end and it is generating the appropriate option tags! it's just that these option tags are not loaded in the select tag.
Thanks for the help