-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate.js
More file actions
26 lines (24 loc) · 769 Bytes
/
create.js
File metadata and controls
26 lines (24 loc) · 769 Bytes
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
L.mapbox.accessToken = 'pk.eyJ1IjoiYnNoYW5rd2l0eiIsImEiOiJjaW14cHA0YTcwM2x2dXdtNGN1dDc5OXN0In0.URoO3IYb5g29cxUykBZ9Aw';
var map = L.mapbox.map('map', 'mapbox.streets')
.setView([30.433832, -84.290650], 12);
$('#submit').on('click',function(){
var loginObject = new Object();
loginObject.email = $('#email').val();
loginObject.password = $('#password').val();
console.log('click');
$.ajax ({
url: "http://localhost:3000/users",
crossDomain: true,
type: "POST",
data: loginObject,
dataType: "json",
contentType: "application/json",
success: function(result) {
console.log(result);
window.location.href = "index.html";
},
error: function() {
console.log("error");
}
});
});