HTML Actions vs Javascript Callbacks


HTML actions:

The action attribute specifies where to send the form-data when a form is submitted. In HTML5, the action attribute is no longer required. We can use javascript to send data on the backend using AJAX.

http://www.w3schools.com/tags/att_form_action.asp

Callbacks in javascript:

In general, a callback function is used once another function you have called finishes. A good example of this is AJAX requests: most libraries have a function that allows you to send a request to the server in the background without refreshing the page (this uses AJAX). You generally provide two callback functions to this AJAX function: a success function, and a failure function.

For more information:
http://javascriptissexy.com/understand-javascript-callback-functions-and-use-them/
http://recurial.com/programming/understanding-callback-functions-in-javascript/

,

Leave a Reply

Your email address will not be published. Required fields are marked *