[jQuery] Loading dynamic AJAX?
I'm coming along OK, my chained combo box is working brilliantly but
the last one needs to be dynamic.
This is the code I have to power that one:
$("#edcounty").change(function() {
$county = $(this).val();
$("#edinst1").css("display", "block");
if($("#educType").val() == 'unirow') {
$("#edinst2").load("vip/education.php?action=unis&countyme=
$county");
}
if($("#educType").val() == 'collegerow') {
$("#edinst2").load("vip/education.php?action=colleges&countyme=
$county");
}
});
It's loading up education.php with default options just fine but I
need the 'countyme' variable in the URL to be dynamic (I have added
'$' to make it stand out and how I want to set it near the top).
How can I achieve something like this?