-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
57 lines (49 loc) · 1.34 KB
/
test.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
<html>
<head>
<TITLE></TITLE>
<link href="../stylesheet.css" rel="stylesheet" type="text/css">
<head>
<style>
body{width:950px;align-content: center;}
}
</style>
<script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$("#search-box-state").keyup(function(){
$.ajax({
type: "POST",
url: "readState.php",
data:'keyword='+$(this).val(),
beforeSend: function(){
$("#search-box-state").css("background","#FFF");
},
success: function(data){
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#search-box-state").css("background","#FFF");
}
});
});
});
function selectState(val) {
$("#search-box-state").val(val);
$("#suggesstion-box").hide();
}
</script>
</head>
<body>
<form action="res.php" method="post">
<div class="frmSearch">
<center><h1>Federal Contractor Vendor Search</h1></center>
<input type="text" id="search-box-state" name="state" placeholder="State Name" />
<input type="text" id="search-box-city" placeholder="City Name" />
<input type="text" id="search-box-zip" placeholder="Zip Code" />
<input type="text" id="search-box-naics" placeholder="NAICS" />
<input type="text" id="search-box-setaside" placeholder="Set-Aside Program" />
<br><br>
<div id="suggesstion-box"></div><br>
</form>
</div>
</body>
</html>