First search request/response that works.
[egate.git] / www / search.egw
index d521220..7c0b84e 100644 (file)
@@ -1,9 +1,36 @@
 <html>
 {
-# $Id: search.egw,v 1.1 1995/10/23 17:04:17 adam Exp $
+# $Id: search.egw,v 1.2 1995/10/27 17:30:16 adam Exp $
+
+proc search-response {} {
+    global sessionWait
+    set sessionWait 0
+
+    htmlr "search response <br>"
+    set r [z39.1 resultCount]
+    htmlr "<strong>$r hits</strong><br>"
+    htmlr "</body></html>"
+}
+
+proc fail-response {} {
+    global sessionWait
+    set sessionWait 0
+
+    htmlr "<strong>failed</strong><br>"
+    htmlr "</body></html>"
+}
+
+    global sessionWait
+
+    z39 callback search-response
+    z39 failback fail-response
+    set sessionWait 1
+    ir-set z39.1 z39
+    z39.1 databaseNames [form base]
+    z39.1 search [form entry1]
+    htmlr <head>
+    htmlr "<title> WWW/Z39.50 Gateway Search Result ...</title>"
 }
-<head>
-<title> WWW/Z39.50 Gateway Search Result</title>
 </head>
 <body>
 sessionId: {html $sessionId} <br>
@@ -12,6 +39,6 @@ form: {html [form]} <br>
 target: {html $t} <br>
 databases: {html $databases} <br>
 <h2> Search in databases </h2>
-<h1> <blink> Not Functional Yet </blink> </h1>
-</body>
-</html>
+{
+    htmlr [form entry1] <br>
+}