-
Notifications
You must be signed in to change notification settings - Fork 0
/
Information page Current.html
107 lines (75 loc) · 2.69 KB
/
Information page Current.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
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
<html>
<head>
<Title> Food stall information</title>
<h1> Food Stall Information</h1>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="../../assets/js/html5shiv.js"></script>
<script src="../../assets/js/respond.min.js"></script>
<![endif]-->
<script src="http://www.parsecdn.com/js/parse-1.2.10.min.js"></script>
<script>
var param = /[&?]var=([^&]+)/.exec(location.search);
param = param ? param[1].replace(/"/g, '"') : '';
//alert(param);
</script>
</head>
<body>
<script language="JavaScript">
Parse.initialize("h8qaiCUgkwu95Xh3vBfPLZXWFAAesDCDMUsBx7X2", "qjvynLCO1cNAG79HCjFVTrtUEVEFz81PDDLmfIlQ");
var Foods = Parse.Object.extend("Foods");
var query = new Parse.Query(Foods);
var param;
//var keyWord = document.getElementById('txtsearch').value;
query.equalTo("objectId", param);
query.find({
success: function(results) {
//alert("Successfully retrieved.");
for (var i=0; i < results.length;i++){
var object = results[i];
//alert(object.id + ' - ' + object.get('foodName'));
param = object.id;
//alert(object.get('foodName'));
//alert(object.get('foodType'));
//alert(object.get('foodStatus'));
//alert(object.get('foodImage'));
document.getElementById('FName').innerHTML = object.get('foodName');
document.getElementById('FType').innerHTML = object.get('foodType');
document.getElementById('FStatus').innerHTML = object.get('foodStatus');
//document.getElementById('pstatus').innerHTML = object.get('foodStatus');
}
},
error:function(error) {
alert("Error: " + error.code + " " + error.message);
}
});
</script>
<!--My code here-->
<style>
body {background-color:#FCE562; }
</style>
<img src="no_image.gif" width="170" height="115" align="Top">
<p> </p>
Stall name:
<p label="FSname" ><b id="FName"> Text </b> </p>
<div>
Food type:
<p label="type" ><b id="FType"> Text </b></p>
<div>
Status:
<p label="Status" ><b id="FStatus" > Text </b></p>
<form action="Maps Current3.html"><input type="submit" value="View map" class="tfbutton">
</form>
<div>
<form action="Report Current.html"><input type="submit" value="Report errors" class="tfbutton">
</form>
<!--My code here-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="//code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>