use href="javascript:mkws.switchView('records')" instead onclick event, MKWS-39
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 29 Aug 2013 16:36:02 +0000 (18:36 +0200)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 29 Aug 2013 16:36:02 +0000 (18:36 +0200)
tools/htdocs/mkws.js

index 95e67d4..fc4528f 100644 (file)
@@ -445,7 +445,7 @@ function pagerPrev() {
 
 mkws.switchView = function(view) {
     debug("switchView: " + view);
-   
+
     var targets = document.getElementById('mkwsTargets');
     var results = document.getElementById('mkwsResults') ||
                  document.getElementById('mkwsRecords');
@@ -692,14 +692,12 @@ function mkws_html_switch(config) {
     debug("HTML switch");
 
     $("#mkwsSwitch").html($("<a/>", {
-       href: '#',
-       onclick: "mkws.switchView(\'records\')",
+       href: "javascript:mkws.switchView('records')",
        text: M("Records")
     }));
     $("#mkwsSwitch").append($("<span/>", { text: " | " }));
     $("#mkwsSwitch").append($("<a/>", {
-       href: '#',
-       onclick: "mkws.switchView(\'targets\')",
+       href: "javascript:mkws.switchView('targets')",
        text: M("Targets")
     }));