Тёмный

Load JSON dynamically using AJAX | XMLHttpRequest Tutorial | For API Use 

dcode
Подписаться 134 тыс.
Просмотров 34 тыс.
50% 1

Through the use of AJAX (XMLHttpRequest) you are able to load JSON dynamically after your website/application has loaded - this allows you to quite powerfully load extra content without having to refresh the page.
As the use of APIs in the modern world of web development is growing and real-time data analysis is becoming more relevant - I thought I would make this video to show you guys how to work with one of the most common mediums of API responses: JSON (JavaScript Object Notation).
In this video I take you through a simple example of how to make a request to a JSON data file and then convert this into a native, fully usable JavaScript object - and we do this using an XMLHttpRequest instance. No jQuery or external library is required1
For your reference, check this out:
developer.mozi...
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!

Опубликовано:

 

8 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 28   
@dcode-software
@dcode-software 6 лет назад
UPDATE: Learn how to use AJAX to load data from an external file straight into your HTML tables: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-12tjh_6xL2M.html
@W0lfbaneShikaisc00l
@W0lfbaneShikaisc00l 4 года назад
Your name is Dom... and you're teaching Javascript... Gives new meaning to navigating the DOM.
@chromashift
@chromashift 2 года назад
Most accessible, reproducible & concise explanation; Thank you.
@dcode-software
@dcode-software 2 года назад
Awesome, glad it was helpful!
@erhanelgun2302
@erhanelgun2302 Год назад
nice and well explained. Thank you.
@eyalshnitzerful
@eyalshnitzerful 6 лет назад
Thank you Dom. Your videos are well explained. I learn a lot!!!
@dcode-software
@dcode-software 6 лет назад
No worries whatsover mate thank you 😁
@am1n_dlt682
@am1n_dlt682 2 года назад
Great explanation.
@Burak-sj7vr
@Burak-sj7vr 5 лет назад
Very very helpful video. Thank you soo much dcode !
@dcode-software
@dcode-software 5 лет назад
No problem 😁
@sureshui2335
@sureshui2335 6 лет назад
Super Dom. Nice. I was afraid of this topic before and i cleared with this videos. thanks lot @domenic
@dcode-software
@dcode-software 6 лет назад
That's what I like to hear mate! No worries 😁
@osasferguson
@osasferguson 2 года назад
SUPERB
@user-iy4sb8cv9k
@user-iy4sb8cv9k 3 года назад
Tank you very very very mutch
@cloudpuncher4615
@cloudpuncher4615 6 лет назад
Thanks Dom, your a machine, do you have a patreon. You’ve been heaps of help with your videos, I would definitely support you.
@dcode-software
@dcode-software 6 лет назад
Hey Stevo, thanks mate! I don't have a Pateron but I've been thinking of doing it if my viewership increases - it's a bit hard to find dedicated time due to my full-time work but yeah it's definitely on the table :)
@motoduster5856
@motoduster5856 5 лет назад
Good stuff!!
@KelvinWKiger
@KelvinWKiger 6 лет назад
*status: 200* { That was just amazing! }
@dcode-software
@dcode-software 6 лет назад
Hey thanks for the support mate cheers 😁
@Wickaruz
@Wickaruz 3 года назад
How can I use the value in resObj outside the function unload()? Or is their an option to use the response from web call after xhr.send()?
@muhammadzubair4754
@muhammadzubair4754 4 года назад
Ihow we can fetch the data from json api and display the data in html form in html page & after submission of data display like json data display in console.
@ahmedabdulrazzaq2015
@ahmedabdulrazzaq2015 3 года назад
What if I want to return the object I try that but it did not work?
@rohithchandrakandambeth2064
@rohithchandrakandambeth2064 3 года назад
Hi Dom, I got an error "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file: path. (Reason: CORS request not HTTP)." Could you help me fix it?
@Daniel_WR_Hart
@Daniel_WR_Hart 2 года назад
It's been a while since I've seen this error but I think the problem is that you're not running a dev server
@Dexter101x
@Dexter101x 3 года назад
Why do Australians have to pronounce everything so weirdly? Data: Darta, Project...prooject, and finally apache: Aparchie
@dcode-software
@dcode-software 3 года назад
How do you pronounce it? Dayta, Prohject, Apatchee?
@salexkorsan8790
@salexkorsan8790 Год назад
is there any way to get Outside result of the Function xmlhttp.onreadystatechange=function(){ if(this.readyState==4 && this.status==200){ var Xs=this.responseText; }} i want this.responseText here, Out Side of the Function. trying to solve from two month, Please Help
Далее
Learn JSON in 10 Minutes
12:00
Просмотров 3,2 млн
JSON and AJAX Tutorial: With Real Examples
40:45
Просмотров 1,8 млн
Самое неинтересное видео
00:32
Просмотров 1,3 млн
Sending JavaScript Http Requests with XMLHttpRequest
18:53
Learn XML HTTP Requests in JavaScript | AJAX Tutorial
10:09
1.4: JSON - Working with Data and APIs in JavaScript
16:22
JSON Crash Course
24:49
Просмотров 1 млн
jQuery AJAX - Getting data from an API endpoint
16:38
Просмотров 3,1 тыс.
What is JSON ?
11:56
Просмотров 1,1 млн
HTML Templates Instead Of Reactivity | Prime Reacts
12:42