Sending POST data with AJAX in JavaScript
It's really easy to make a POST request through AJAX using JavaScript and then attach some data to send with that. This technique can be used to communicate with your server without refreshing the page and even feed it some useful information.
In this video I take you through a simple example of how this works by first setting up the request in JavaScript and then coding a simple PHP script which will do a basic manipulation of the POST variables. From there, we display the server response to the browser.
For your reference, check this out:
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send
0:00 Overview
0:35 Creating XHR Object
0:52 Handling the response
2:08 Sending the request
4:46 Verifying that it works
5:48 Wrapping up
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
#dcode #javascript #webdev
Видео Sending POST data with AJAX in JavaScript канала dcode
In this video I take you through a simple example of how this works by first setting up the request in JavaScript and then coding a simple PHP script which will do a basic manipulation of the POST variables. From there, we display the server response to the browser.
For your reference, check this out:
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send
0:00 Overview
0:35 Creating XHR Object
0:52 Handling the response
2:08 Sending the request
4:46 Verifying that it works
5:48 Wrapping up
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
#dcode #javascript #webdev
Видео Sending POST data with AJAX in JavaScript канала dcode
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
JSON and AJAX Tutorial: With Real Examples2.3 HTTP Post Request with fetch() - Working with Data and APIs in JavaScriptCreating an AJAX Submit Form using JavaScript - Tutorial For BeginnersSend form data using AJAX in JQuery -PHPSending JavaScript Http Requests with XMLHttpRequestUso di Ajax, esempio pratico #2AJAX Crash Course (Vanilla JavaScript)10.5: Working with APIs in Javascript - p5.js TutorialGet data from database using AJAX, Javascript, PHP, MySQL4: How to use get and post methods in jQuery AJAX - Learn AJAX programmingjQuery Ajax Tutorial #2 - Posting data to backend (jQuery tutorial #8)Sending JavaScript Http Requests with the fetch() API08: How to pass JSON data to server side using jQuery AJAX ?Ajax tutorial in hindi | JavaScript Tutorial In Hindi #35Sending Form Data (POST) with the Fetch API in JavaScriptWhat Is Ajax?Learn XML HTTP Requests in JavaScript | AJAX TutorialLoading data into HTML Tables using AJAX - JavaScript TutorialLearn Fetch API In 6 Minutes5: How to validate a form using AJAX - Learn AJAX programming