Remove unnecessary var and update function name.

This commit is contained in:
Kasen IO 2020-03-04 11:08:38 -05:00
parent df1d2f28d8
commit 9b385d91a8

View file

@ -95,8 +95,7 @@
} }
} }
function choose(choice) { function navigateTo(url) {
var url = choice;
var readyEvent = { var readyEvent = {
"action": "goToUrl", "action": "goToUrl",
"visit": url, "visit": url,
@ -158,7 +157,7 @@
for (var j = 0; j < col.length; j++) { for (var j = 0; j < col.length; j++) {
var tabCell = tr.insertCell(-1); var tabCell = tr.insertCell(-1);
if (j == 2) { if (j == 2) {
var url = "<input id=\"Button\" class=\"myButton\" type=\"button\" onclick=\"choose('" + myAddress[i][col[j]] + "')\" value=\"Visit\" />"; var url = "<input id=\"Button\" class=\"myButton\" type=\"button\" onclick=\"navigateTo('" + myAddress[i][col[j]] + "')\" value=\"Visit\" />";
tabCell.innerHTML = url; tabCell.innerHTML = url;
} else { } else {
tabCell.innerHTML = myAddress[i][col[j]]; tabCell.innerHTML = myAddress[i][col[j]];