12 |
|
|
13 |
<body> |
<body> |
14 |
|
|
15 |
<h1>Example Search with jsFind</h3> |
<h1>Example Search with jsFind</h1> |
16 |
|
|
17 |
<script type="text/javascript"> |
<script type="text/javascript"> |
18 |
|
// <!-- |
19 |
var args=getArgs(); |
var args=getArgs(); |
20 |
function select_option(value,text,selected) { |
function select_option(value,text,selected) { |
21 |
document.write('<option value="'+value+'"'); |
document.write('<option value="'+value+'"'); |
22 |
if (value == selected) document.write(' selected'); |
if (value == selected) document.write(' selected'); |
23 |
document.write('>'+text+'</option>'); |
document.write('>'+text+'</option>'); |
24 |
} |
} |
25 |
|
// --> |
26 |
</script> |
</script> |
27 |
|
|
28 |
<form name="search" onsubmit="return go(this);"> |
<form id="search" action="get" onsubmit="return go(this);"> |
29 |
<font color="maroon">Query</font> |
<div> |
30 |
|
<span style="color: maroon;">Query</span> |
31 |
<script type="text/javascript"> |
<script type="text/javascript"> |
32 |
|
// <!-- |
33 |
document.write('<select name="index_name">'); |
document.write('<select name="index_name">'); |
34 |
select_option("lorem","Lorem example",args.index_name); |
select_option("lorem","Lorem example",args.index_name); |
35 |
select_option("words","Words from dict",args.index_name); |
select_option("words","Words from dict",args.index_name); |
36 |
select_option("homer","Homer: The Odyssey",args.index_name); |
select_option("homer","Homer: The Odyssey",args.index_name); |
37 |
document.write('</select>'); |
document.write('</select>'); |
38 |
|
// --> |
39 |
</script> |
</script> |
40 |
for |
for |
41 |
<script type="text/javascript"> |
<script type="text/javascript"> |
42 |
|
// <!-- |
43 |
document.write("<input name=\"query\" value=\""); |
document.write("<input name=\"query\" value=\""); |
44 |
|
|
45 |
if (args.query) { |
if (args.query) { |
48 |
} |
} |
49 |
|
|
50 |
document.write("\" type=\"text\" size=\"60\"/>\n"); |
document.write("\" type=\"text\" size=\"60\"/>\n"); |
51 |
|
// --> |
52 |
</script> |
</script> |
53 |
|
|
54 |
<input type="SUBMIT" value="Submit"/><br/> |
<input type="submit" value="Submit"/><br/> |
55 |
|
</div> |
56 |
</form> |
</form> |
57 |
|
|
58 |
<script type="text/javascript"> |
<script type="text/javascript"> |
59 |
|
// <!-- |
60 |
if (args.query) { |
if (args.query) { |
61 |
document.write("<div id=\"results\"><h2>Please wait...</h2></div>\n"); |
document.write("<div id=\"results\"><h2>Please wait...</h2></div>\n"); |
62 |
doSearch(args.index_name, args.query, printResults); |
doSearch(args.index_name, args.query, printResults); |
63 |
} |
} |
64 |
|
// --> |
65 |
</script> |
</script> |
66 |
|
|
67 |
<p>Enter your keywords to search for seperated by spaces.<br/>The |
<div> |
68 |
|
Enter your keywords to search for seperated by spaces.<br/>The |
69 |
results will be only those documents which contain <b>ALL</b> of the |
results will be only those documents which contain <b>ALL</b> of the |
70 |
requested keywords</p> |
requested keywords |
71 |
|
</div> |
72 |
|
|
73 |
<div id="debug" style="color: gray;"> |
<div id="debug" style="color: gray;"> |
74 |
</div> |
</div> |