-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfindBooks.php
executable file
·85 lines (65 loc) · 1.59 KB
/
findBooks.php
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
<style>
.hr:hover{ background:#F90;}
.del:hover{ background:#FFF;}
.hed{
float:left;
margin-left:20px;
margin-top:10px;}
.s{ background:#F90;}
</style>
<script type="text/javascript">
$(document).ready(function(){
$(".search").keyup(function()
{
var searchbox = $(this).val();
var dataString = 'searchword='+ searchbox;
if(searchbox=='')
{
$.ajax({
type: "POST",
url: "allbooks.php",
data: dataString,
cache: false,
success: function(html)
{
$("#displaybooks").html(html).show();
}
});
}
else
{
$.ajax({
type: "POST",
url: 'searchallbooks.php',
data: dataString,
cache: false,
success: function(html)
{
$("#displaybooks").html(html).show();
}});
}return false;
});
});
jQuery(function($){
$("#searchbox").Watermark("Search Books through Book ID, Title, Authors");
});
</script>
<table border="0" style="border:1px inset #999; margin-top:20px; margin-left:40px; float:left;">
<tr><td>
<input type="text" style="width:500px; padding:4px;" onclick="clear()" class="search" id="searchbox" />
</td>
</tr></table>
<div class="hed">
<table width="853" border="0" cellspacing="1" style="margin-left:20px;font-size:12px; font-family:Verdana, Geneva, sans-serif;">
<thead>
<tr bgcolor="#F90" height="30" align="center">
<td class="s" width="100"><strong>Book ID</strong></td>
<td class="s" width="400"><strong>Title</strong></td>
<td class="s" width="200"><strong>Author</strong></td>
</tr>
</thead></table>
<div id="displaybooks">
<?php include('allbooks.php'); ?>
</div>
<br/>
</div>