ajax post form listener button
$("button").click(function(e) {
e.preventDefault();
$.ajax({
type: "POST",
url: "/pages/test/",
data: {
id: $(this).val(), // < note use of 'this' here
access_token: $("#access_token").val()
},
success: function(result) {
alert('ok');
},
error: function(result) {
alert('error');
}
});
});
Also in JavaScript:
- submitting login and sign up forms using AJAX
- react native mac
- create array javascript
- nuxt client-only component
- How to pass a map from controller to javascript function in VF page
- JavaScript chop/slice/trim off last character in string
- app.router.navigate reset framework7
- Function used to reload the portion of a page using javascript
- jquery datatable returning current datetime
- react native passing params to nested navigators
- next js newsletter
- how to create an html element in javascript without document
- conditional props react
- array find method javascript
- SyntaxError: Unexpected token u in JSON at
- return value from fetch javascript
- How to insert an element after another element in JavaScript without using a library?
- how to change test colo on js button
- Discord embeds
- how to push in object in javascript
- pyramid js
- angular scroll to element horizontally
- reload ajax datatable
- end code nodejs