1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml">
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 <title>Pazpar2 demo client</title>
9 <link rel="stylesheet" href="styles.css"></link>
14 var JSON = JSON || {};
16 // implement JSON.stringify serialization
17 JSON.stringify = JSON.stringify || function (obj) {
19 if (t != "object" || obj === null) {
21 if (t == "string") obj = '"'+obj+'"';
25 // recurse array or object
26 var n, v, json = [], arr = (obj && obj.constructor == Array);
28 v = obj[n]; t = typeof(v);
29 if (t == "string") v = '"'+v+'"';
30 else if (t == "object" && v !== null) v = JSON.stringify(v);
31 json.push((arr ? "" : '"' + n + '":') + String(v));
33 return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}");
37 function search(message)
39 var body = document.getElementById("body");
40 body.innerHTML = message;
42 //document.location = "myapp:myfunction:record:" + count ":value1:value2:value3";
43 termlist[message] = count + 1;
44 document.location = "myapp:" + "myfunction:" + count + ":" + message + ":" + JSON.stringify(termlist));
56 <a href="myapp:myfunction:record:id:value1:value2:value3">callback</a>