diff --git a/docker/cgi/mavevis.js b/docker/cgi/mavevis.js index 981613f..f0af236 100644 --- a/docker/cgi/mavevis.js +++ b/docker/cgi/mavevis.js @@ -72,12 +72,20 @@ $(document).ready(function(){ */ function reset() { - $("#submitButton").prop('disabled', true); - $("#outputpanel").hide(); - $("#molecule").val(""); ssid=null; + resetMost(); + } + + /** + * Resets most of the form back to its initial state, except for the score set + */ + function resetMost() { + + $("#submitButton").prop('disabled', true); + $("#outputpanel").hide(); + $("#uniprot").val(""); uniprot=null; $("#uniprotOptions").hide(); @@ -257,6 +265,8 @@ $(document).ready(function(){ delay: 500, select: function(event, ui) { + resetMost(); + ssid = ui.item.ssid; //if a uniprot ID is available, automatically fill it in if (ui.item.uniprot) {