diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index de19ebf5..1470c924 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -124,6 +124,7 @@ class Logbook extends CI_Controller { $this->load->model('logbook_model'); $return = [ + "callsign" => strtoupper($callsign), "dxcc" => false, "callsign_name" => "", "callsign_qra" => "", diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index c72c8f53..52177ad8 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -360,8 +360,9 @@ $("#callsign").focusout(function() { // Replace / in a callsign with - to stop urls breaking $.getJSON('logbook/json/' + find_callsign.replace(/\//g, "-") + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), function(result) { - // Make sure the typed callsign and temp callsign match - if($('#callsign').val = temp_callsign){ + + // Make sure the typed callsign and json result match + if($('#callsign').val = result.callsign) { if(result.dxcc.entity != undefined) { $('#country').val(convert_case(result.dxcc.entity));