diff --git a/js/GUI.Utils.js b/js/GUI.Utils.js
index 1367a81..168a8ec 100644
--- a/js/GUI.Utils.js
+++ b/js/GUI.Utils.js
@@ -26,7 +26,8 @@ $(document).ready(function() {
drawline(grabPositionByName($('#pointa option:selected').text()),grabPositionByName($('#pointb option:selected').text()));
}
});
-
+ $('#cbs').click(function() {populateFBSelect(); });
+ $('#cbp').click(function() {populateFBSelect(); });
$("#pointa").focus(function() {
lastInputBox = "pointa";
// console.log('Updating last touched box to : ' + lastInputBox)
@@ -44,26 +45,8 @@ $(document).ready(function() {
function populateUserFields() {
- //Populate find by select dropdown
- var types = [];
- var checkboxes = document.getElementsByName("objtype");
- for (var type in checkboxes) {
- if(checkboxes[type].checked) {
- types[type] = checkboxes[type].value;
- }
-
- }
- var option = '';
- for (var type in types) {
- var keys = Object.keys(listobjects(types[type]));
- keys.sort().forEach(function(element, index, array){
- option += '';
- });
-
- }
-
- $('#findbyselect').html(option);
-
+ // Populate findby box
+ populateFBSelect();
// Populate pointa and pointb dropdowns
var types = ['planets','stations'];
option = "";
@@ -81,6 +64,28 @@ function populateUserFields() {
$('#pointa').html(option);
$('#pointb').html(option);
+}
+function populateFBSelect() {
+ //Populate find by select dropdown
+ var types = [];
+ var checkboxes = document.getElementsByName("objtype");
+ for (var type in checkboxes) {
+ if(checkboxes[type].checked) {
+ types[type] = checkboxes[type].value;
+ }
+
+ }
+ var option = '';
+ for (var type in types) {
+ var keys = Object.keys(listobjects(types[type]));
+ keys.sort().forEach(function(element, index, array){
+ option += '';
+ });
+
+ }
+
+ $('#findbyselect').html(option);
+
}
function openTab(evt,tabName) {
diff --git a/webviewgl.htm b/webviewgl.htm
index 0a1599b..ab9705b 100644
--- a/webviewgl.htm
+++ b/webviewgl.htm
@@ -123,7 +123,7 @@
-
+