-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSearch_Example.html
33 lines (27 loc) · 1.12 KB
/
Search_Example.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
<!DOCTYPE html>
<head>
<script src="widget/contact_search.js"></script>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>-->
<script src="jquery.xdomainrequest.min.js"></script>
<link rel="stylesheet" href="widget/contact_search.css">
</head>
<body>
<div id="mycontactdiv"></div>
</div>
<script type="text/javascript">
var params = {
el : $('#mycontactdiv'), //div in which to place the contact search widget
// url : 'http://staging.api.m.ox.ac.uk/contact/search?', //optionally override the url used for search
// url : 'http://localhost:5000/contact/search?',
pageSize : 5, // defaults to 10
prefill : { //provide this object to perform a search immediately
lastname : "Smith",
initial : "J",
match : "approximate", // defaults to 'exact'
medium : "email", // 'phone' or 'email'
},
autofocus: true, //if true, select the surname input field as soon as the widget is created
};
contact_search.create_form(params);
</script>
</body>