-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibguides-worldcat-discovery-search-box.html
102 lines (79 loc) · 3.85 KB
/
libguides-worldcat-discovery-search-box.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
</head>
<body>
<!--****** do not use code above this line-->
<style>
#searchInput{width: 50%;}
</style>
<script>
$(document).ready(function(){
});
function submitWC() {
var queryString=document.getElementsByName('searchInput')[0].value;
var formatVal = "all";
if (document.getElementsByName('format')[0].checked){
formatVal="Artchap&format=Jrnl&format=News";
}
var scope = "";
if (document.getElementById('scope').value != "999"){ // explicit fake value to indicate search all
scope=document.getElementById('scope').value;
}
var worldcat = 'https://depaul.on.worldcat.org/search?queryString=' + queryString + '&scope=' + scope + "&format=" + formatVal;
window.open(worldcat);
}
function changeWCSearch() {
if (document.getElementsByName('searchInput')[0].value.trim()==""){
document.getElementsByName('searchInput')[0].value="Search books, articles, I-Share and more...";
}
}
function setWCSearch() {
document.getElementsByName('searchInput')[0].value="Search books, articles, I-Share and more...";
}
function clearWCSearch() {
if (document.getElementsByName('searchInput')[0].value=="Search books, articles, I-Share and more..." ){
document.getElementsByName('searchInput')[0].value="";
}
else {
if (document.getElementsByName('searchInput')[0].value==""){
document.getElementsByName('searchInput')[0].value="Search books, articles, I-Share and more...";
}
}
}
</script>
<h2>Search DePaul WorldCat Discovery</h2>
<input name="qt" value="affiliate" type="hidden"/> <input name="ai" value="wclocal_813" type="hidden"/>
<div class="block" id="wcl_searchbox">
<div class="block">
<span>
<input name="searchInput" title="Search books, articles, I-Share and more..." class="wcl_text" id="searchInput" onkeypress="if(event.keyCode===13)submitWC();" onfocus="clearWCSearch();" onblur="changeWCSearch();" value="Search books, articles, I-Share and more..." type="text"/>
</span>
<span class="hpadding">
<select name="scope" id="scope">
<option value="999" selected>Libraries Worldwide</option> <!-- Need a fake value here because null gets stripped out -->
<option value="sz:30986">I-Share Libraries</option>
<option value="sz:33458">DePaul University</option>
</select>
<input name="oldscope" type="hidden"/>
</span>
<span>
<input id="wcl_search_button" onclick="submitWC(); return false;" value="Search" type="submit"/> </span>
<div>
<label class="offscreen" for="format">Search Articles Only</label>
<input name="format" value="" type="checkbox"/>
</div>
<p><a href="https://depaul.on.worldcat.org/advancedsearch" target="_top">Advanced Search</a></span> <span class="wcl_left sep">|</span> <span class="wcl_left"><a href="https://vufind.carli.illinois.edu/vf-dpu" target="_top">DePaul VuFind Catalog</a>
</p>
<!--****** do not use code below this line-->
</body>
</html>