If SatPC32 isn't the selected radio then clear the sat_name and sat_mode fields

pull/231/head
Peter Goodhall 2018-12-02 17:14:14 +00:00
rodzic 83ba78d658
commit 0b732d59ca
1 zmienionych plików z 13 dodań i 4 usunięć

Wyświetl plik

@ -325,15 +325,16 @@
}
});
// Get SAT_Name
// Get SAT_Name
$.get('radio/satname/' + $('select.radios option:selected').val(), function(result) {
$(".sat_name").val(result);
$(".sat_name").val(result);
});
// Get SAT_Name
// Get SAT_Name
$.get('radio/satmode/' + $('select.radios option:selected').val(), function(result) {
$(".sat_mode").val(result);
$(".sat_mode").val(result);
});
}
};
@ -343,6 +344,14 @@
// If a radios selected from drop down select radio update.
$('.radios').change(updateFromCAT);
// If radio isn't SatPC32 clear sat_name and sat_mode
$( ".radios" ).change(function() {
if ($("#yourdropdownid option:selected").text() != "SatPC32") {
$(".sat_name").val("");
$(".sat_mode").val("");
}
});
/* On Page Load */
var catcher = function() {
var changed = false;