-
Notifications
You must be signed in to change notification settings - Fork 0
/
vet.html
51 lines (36 loc) · 1.45 KB
/
vet.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<!-- Parse library js -->
<script src="lib/parse-1.3.2.min.js"></script>
<script>
Parse.initialize("8EsrtjkfqGJE3zoFJ3JxDY54WOCiDo7xuRN8UMoE", "ujUckpnMOoJEdHlZ9wXDrJDpvtYFLEguVD5GLwZx");
function savePost() {
var VetObj = Parse.Object.extend("Veterinarian");
var vet = new VetObj();
var title = $("#title").val();
var tel = $("#tel").val();
var p = $("#coordinate").val().split(",");
var coordinate = new Parse.GeoPoint(parseFloat(p[0]),parseFloat(p[1]));
var address = $("#address").val();
vet.set("title", title);
vet.set("tel", tel);
vet.set("coordinate", coordinate);
vet.set("address", address);
vet.save().then(function() {
alert("saved");
})
}
</script>
</head>
<body>
<label><input type="text" id="title" name="title" placeholder="İsim"/></label><br>
<label><input type="tel" id="tel" name="tel" placeholder="Tel"/></label><br>
<label><input type="text" id="coordinate" name="coordinate" placeholder="Koordinat"/></label><br>
<label><textarea name="address" id="address" cols="50" rows="10" placeholder="adres"></textarea></label><br>
<button onclick="savePost()">Gönder</button>
</body>
</html>