-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestauto.php
124 lines (115 loc) · 5.79 KB
/
testauto.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<link href="jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
<link href="jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
<link href="jQueryAssets/jquery.ui.autocomplete.min.css" rel="stylesheet" type="text/css">
<link href="jQueryAssets/jquery.ui.menu.min.css" rel="stylesheet" type="text/css">
<script src="jQueryAssets/jquery-1.11.1.min.js"></script>
<script src="jQueryAssets/jquery.ui-1.10.4.autocomplete.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(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();
}
$(document).ready(function() {
$("#search-box-city").keyup(function(){
var state = $("#search-box-state").val();
$.ajax({
type: "POST",
url: "readCity.php",
data:'keyword='+$(this).val()+'&state='+state,
beforeSend: function() {
$("#search-box-city").css("background","FFF");
},
success: function(data){
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#search-box-city").css("background","FFF");
}
});
});
});
function selectCity(val){
$("#search-box-city").val(val);
$("#suggesstion-box").hide();
}
$(document).ready(function() {
$("#search-box-zip").keyup(function(){
var state = $("#search-box-state").val();
var city = $("#search-box-city").val();
$.ajax({
type: "POST",
url: "readZip.php",
data:'keyword='+$(this).val()+'&state='+state+'&city='+city,
beforeSend: function() {
$("#search-box-zip").css("background","FFF");
},
success: function(data){
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#search-box-zip").css("background","FFF");
}
});
});
});
function selectZip(val){
$("#search-box-zip").val(val);
$("#suggesstion-box").hide();
}
$(document).ready(function() {
$("#search-box-naics").keyup(function(){
$.ajax({
type: "POST",
url: "readNaics.php",
data:'keyword='+$(this).val(),
beforeSend: function() {
$("#search-box-naics").css("background","FFF");
},
success: function(data){
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#search-box-naics").css("background","FFF");
}
});
});
});
function selectNaics(val){
$("#search-box-naics").val(val);
$("#suggesstion-box").hide();
}
</script>
<div class="frmSearch">
<p>
<center><h1>Federal Contractor Vendor List</h1></center>
</p><p>
<input type="text" id="search-box-state" name="State" placeholder="State Name" />
<input type="text" id="search-box-city" name="City" placeholder="City Name" />
<input type="text" id="search-box-zip" name="Zip" placeholder="Zip Code" />
<input type="text" id="search-box-naics" name="NAICS" placeholder="NAICS Code" />
<div id="suggesstion-box"></div>
</div>
</body>
</html>