From 0b732d59caea6f47c0b5497eccc7bc68f153d370 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sun, 2 Dec 2018 17:14:14 +0000 Subject: [PATCH] If SatPC32 isn't the selected radio then clear the sat_name and sat_mode fields --- application/views/qso/index.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/application/views/qso/index.php b/application/views/qso/index.php index d6fcb6f2..e25f48f4 100644 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -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;