From: Mike Taylor Date: Tue, 18 Jun 2013 15:37:30 +0000 (+0100) Subject: Fill in #switchmenu using JQuery calls instead of HTML text. X-Git-Tag: 0.9.1~590 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=9b8827ac0b60d52f491fdb5514023dad8153d00d;p=mkws-moved-to-github.git Fill in #switchmenu using JQuery calls instead of HTML text. --- diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 65e6219..b23e043 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -377,9 +377,13 @@ $(document).ready(function() { var jqxhr = jQuery.get("/service-proxy-auth") .fail(function() { alert("service proxy authentifiction failed"); }); - // Less code needs to be included in the HTML client - $('#switchmenu').html('\ - Record Browser\ - | \ - Target Info'); + $("#switchmenu").html($("", { href: '#', + onclick: "switchView(\'recordview\')", + text: "Record Browser", + })); + $("#switchmenu").append($("", { text: " | " })); + $("#switchmenu").append($("", { href: '#', + onclick: "switchView(\'targetview\')", + text: "Target Info", + })); });