From: Mike Taylor Date: Wed, 19 Jun 2013 09:21:17 +0000 (+0100) Subject: Move more code into JS. Reorder document-ready function X-Git-Tag: 0.9.1~584 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=c0c7390fd6671ff00b4c0ca77def47e0ca52ef52;p=mkws-moved-to-github.git Move more code into JS. Reorder document-ready function --- diff --git a/experiments/spclient/index.html b/experiments/spclient/index.html index f24a91f..32d894a 100644 --- a/experiments/spclient/index.html +++ b/experiments/spclient/index.html @@ -14,11 +14,7 @@

Searching will not work if JavaScript is disabled.

-
- - -
- +
diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index eacaec5..15dcd17 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -373,10 +373,6 @@ function renderDetails(data, marker) $(document).ready(function() { - domReady(); - var jqxhr = jQuery.get("/service-proxy-auth") - .fail(function() { alert("service proxy authentifiction failed"); }); - $("#mkwsSwitch").html($("", { href: '#', onclick: "switchView(\'recordview\')", text: "Record Browser", @@ -386,4 +382,18 @@ $(document).ready(function() { onclick: "switchView(\'targetview\')", text: "Target Info", })); + + // For some reason, doing this programmatically results in + // document.search.query being undefined, hence the raw HTML. + $("#mkwsSearch").html('\ +
\ + \ + \ + '); + + domReady(); + + var jqxhr = jQuery.get("/service-proxy-auth") + .fail(function() { alert("service proxy authentifiction failed"); }); + });