public
Created

  • Download Gist
gistfile1.html
Liquid
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
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<script type="text/javascript" src="jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="http://www.parsecdn.com/js/parse-1.0.23.min.js"></script>
<script>
var SightingObject;
 
$(document).ready(function() {
 
Parse.initialize("8Y0x2rCA0jKYdiC7wLKQuF9nQqKGFKdpqUHMfue3", "8m7ng0w9UirTV6k4ExsJ0WsmPGeZMsJd5hcu54Oq");
SightingObject = Parse.Object.extend("SightingObject");
var query = new Parse.Query(SightingObject);
query.find({
success: function(results) {
var s = '';
for(var i=0, len=results.length; i<len; i++) {
var result = results[i];
s+= '<p>';
s+= '<b>ID:</b> '+ result.id + '<br/>';
s+= 'Number of UFOs: ' + result.attributes.numufos + '<br/>';
s+= 'Reporter Name: ' + result.attributes.yourname + '<br/>';
s+= 'Description: ' + result.attributes.description;
s+= '</p>'
}
$("#list").html(s);
},
error: function(error) {
alert("Error: " + error.code + " " + error.message);
}
});
 
});
 
</script>
<style>
body {
margin-left: 25px;
margin-right: 25px;
font-family: arial;
}
input {
width: 100%;
height: 25px;
}
textarea {
width: 100%;
}
 
</style>
</head>
 
<body>
 
<h2>Sighting Reporter</h2>
 
<div id="list">
</div>
 
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.