1 |
<!DOCTYPE html PUBLIC |
2 |
"-//W3C//DTD XHTML 1.0 Strict//EN" |
3 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
4 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
5 |
<head> |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> |
7 |
<title>jsFind Example</title> |
8 |
<script src="js/getargs.js" type="text/javascript"></script> |
9 |
<script src="js/search.js" type="text/javascript"></script> |
10 |
<script src="js/usage.js" type="text/javascript"></script> |
11 |
<script type="text/javascript"> |
12 |
//<![CDATA[ |
13 |
var args=getArgs(); |
14 |
function select_option(value,text,selected) { |
15 |
document.write('<option value="'+value+'"'); |
16 |
if (value == selected) document.write(' selected'); |
17 |
document.write('>'+text+'</option>'); |
18 |
} |
19 |
function search_on_load() { |
20 |
if (args.query) { |
21 |
doSearch(args.index_name, args.query, printResults); |
22 |
} |
23 |
|
24 |
} |
25 |
//]]> |
26 |
</script> |
27 |
</head> |
28 |
|
29 |
<body onLoad="search_on_load();"> |
30 |
<div> |
31 |
<h1>Example Search with jsFind</h1> |
32 |
|
33 |
<script type="text/javascript"> |
34 |
// <!-- |
35 |
// --> |
36 |
</script> |
37 |
|
38 |
<form id="search" action="get" onsubmit="return go(this);"> |
39 |
<div> |
40 |
<span style="color: maroon;">Query</span> |
41 |
<script type="text/javascript"> |
42 |
// <!-- |
43 |
document.write('<select name="index_name">'); |
44 |
select_option("lorem","Lorem example",args.index_name); |
45 |
select_option("words","Words from dict",args.index_name); |
46 |
select_option("homer","Homer: The Odyssey",args.index_name); |
47 |
document.write('</select>'); |
48 |
// --> |
49 |
</script> |
50 |
for |
51 |
<script type="text/javascript"> |
52 |
// <!-- |
53 |
document.write("<input name=\"query\" value=\""); |
54 |
|
55 |
if (args.query) { |
56 |
var search_string = args.query.replace(/\+/gi," "); |
57 |
document.write(search_string); |
58 |
} |
59 |
|
60 |
document.write("\" type=\"text\" size=\"60\"/>\n"); |
61 |
// --> |
62 |
</script> |
63 |
|
64 |
<input type="submit" value="Submit"/><br/> |
65 |
</div> |
66 |
</form> |
67 |
|
68 |
<div id="results"> </div> |
69 |
|
70 |
<div> |
71 |
Enter your keywords to search for seperated by spaces.<br/>The |
72 |
results will be only those documents which contain <b>ALL</b> of the |
73 |
requested keywords |
74 |
</div> |
75 |
|
76 |
<div id="debug" style="color: gray;"> |
77 |
</div> |
78 |
|
79 |
</div> |
80 |
</body> |
81 |
</html> |