-
Notifications
You must be signed in to change notification settings - Fork 0
/
index1223.php
87 lines (77 loc) · 1.88 KB
/
index1223.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
86
87
<!DOCTYPE html>
<html>
<head>
<div class="navbar navbar-inverse navbar-fixed-top navbar-custom">
<div class="container">
<a href="index1.php"><img class="img-responsive2"
src="img/header-bg (2).jpg" alt="Mountain View" width="120" height="120"></a>
</div>
</div>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.navbar-custom {
color: black;
background-color: black;
}
.container {
max-width: 100%;
margin: 0 auto;
padding: 40px;
}
</style>
</head>
<body>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Generic search</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<a href="searchsec.html">Back</a>
<center> <img src="img/header-bg (2).jpg" alt="Mountain View" width="220" height="160">
</center>
<div class="container">
<br />
<h2 align="center">Search by Generic Name</h2><br />
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">Search</span>
<input type="text" name="search_text" id="search_text" placeholder="Enter Generic Medicine Name" class="form-control" />
</div>
</div>
<br />
<div id="result"></div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
load_data();
function load_data(query)
{
$.ajax({
url:"fetch.php",
method:"POST",
data:{query:query},
success:function(data)
{
$('#result').html(data);
}
});
}
$('#search_text').keyup(function(){
var search = $(this).val();
if(search != '')
{
load_data(search);
}
else
{
load_data();
}
});
});
</script>