a closing </div> in the forms kills IE8 rendeing, MKWS-4
[mkws-moved-to-github.git] / experiments / spclient / mkws.js
index 82b431b..317027c 100644 (file)
@@ -437,7 +437,7 @@ function mkws_html_all(data) {
        sort_default: "relevance",
        perpage_default: 20,
        query_width: 50,
-       switch: true, /* show/hide Records|Targets menu */
+       switch_menu: true, /* show/hide Records|Targets menu */
        debug: 0,     /* debug level for development: 0..2 */
 
        dummy: "dummy"
@@ -463,7 +463,7 @@ function mkws_html_all(data) {
     // document.search.query being undefined, hence the raw HTML.
     debug("HTML search form");
     $("#mkwsSearch").html('\
-    <form id="searchForm" name="search">\
+    <form id="searchForm" name="search" action="" >\
       <input id="query" type="text" size="50" />\
       <input id="button" type="submit" value="' + M('Search') + '" />\
     </form>');
@@ -477,7 +477,7 @@ function mkws_html_all(data) {
           </td>\
           <td valign="top">\
             <div id="ranking">\
-              <form name="select" id="select">\
+              <form name="select" id="select" action="" >\
         ' + M('Sort by') + mkws_html_sort(config) + '\
         ' + M('and show') + ' ' + mkws_html_perpage(config) + '\
         ' + M('per page') + '.\
@@ -488,8 +488,7 @@ function mkws_html_all(data) {
             <div id="results"></div>\
           </td>\
         </tr>\
-      </table>\
-    </div>');
+      </table>');
 
     mkws_html_switch(config);
     if (mkws_config.use_service_proxy)
@@ -532,8 +531,8 @@ function mkws_html_switch(config) {
       </div>');
     $("#mkwsTargets").css("display", "none");
 
-    if (!config.switch) {
-       debug("disable switch");
+    if (!config.switch_menu) {
+       debug("disable switch menu");
         $("#mkwsSwitch").css("display", "none");
     }
 }
@@ -657,7 +656,8 @@ jQuery.extend({
 function debug(string) {
     if (!mkws_debug)
        return;
-    
+   
+    var console; // IE8 quirks 
     if (!console) { /* ARGH!!! */
        return;
     }