Created
January 27, 2018 19:28
-
-
Save nix010/b9cca52e7257cfe4675faaf519d30d31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
method: "POST", | |
url: '{% url 'aj_location' %}', | |
dataType:'json', | |
data: {'data':this.dataset.gmap}, | |
success: function(data){ | |
if(data.is_saved){ | |
alert('Added '+data.data.name); | |
}else{ | |
alert(''+data.data.name+' is existed ', 'orange','times'); | |
} | |
}, | |
error:function (request, status, error) { | |
console.log(error); | |
alert('Error ! Try again please', 'red','times'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment