Sending POST data with AJAX in JavaScript

Sending POST data with AJAX in JavaScript

dcode

6 лет назад

175,417 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@peterkim9696
@peterkim9696 - 27.06.2019 05:03

What if the php file was uploaded to another website will the post request work?

Ответить
@rianarama8927
@rianarama8927 - 22.09.2019 13:09

What if the php file was uploaded to another website will the post request work?

Ответить
@shupesmerga4694
@shupesmerga4694 - 17.10.2019 06:54

this is so much fuking better than other tutorials out there that GETs data from an arbitrary .txt file or some magical JSON file that pops up out of no where.

Ответить
@nachosuarez9304
@nachosuarez9304 - 25.10.2019 11:02

can you do this with javascript and c++

Ответить
@arminharper510
@arminharper510 - 17.11.2019 07:36

so my html shows status 200 with a green circle yet my PHP is receiving no data and $_POST is empty?

Ответить
@drusttaib607
@drusttaib607 - 30.11.2019 13:32

HELP! the xhr.send(); method doesn't work, it gives error" 405 method is not allowed" i am trying it on a localhost server

Ответить
@amutharavikumar4651
@amutharavikumar4651 - 27.12.2019 09:44

Simple and neat explanation , Thanks

Ответить
@HarshRajAlwaysfree
@HarshRajAlwaysfree - 06.04.2020 15:18

Finally found someone who didnt used stupid jquery

i dont mean to hate on people or the library but it can just die i dont even care about it, vanilla maybe takes longer to write but its easier to debugg and access.

Ответить
@matanvinkler71
@matanvinkler71 - 19.04.2020 11:26

I made a website that request 2 numbers from input and send them to the server and send the summary to the client but I got an error message "Undefined Index" what can I do?

Ответить
@butchiki05
@butchiki05 - 08.05.2020 13:46

how did you setup vscode for web development? what extensions are you using?

Ответить
@Rennaa123
@Rennaa123 - 17.05.2020 00:09

Simple and understandable, thank you!

Ответить
@marineoutsource
@marineoutsource - 25.05.2020 21:21

I've included this in all my playlist just to make sure I will not lose this tutorial :)

Ответить
@karankawad2635
@karankawad2635 - 29.05.2020 13:49

thanks this helped me

Ответить
@zizilatif2609
@zizilatif2609 - 05.07.2020 20:59

OMG you explained this so well, I am using AJAX for the first time.... this really made a lot of sense! thanks.

Ответить
@antoniosalzano5253
@antoniosalzano5253 - 28.07.2020 02:25

do i have to create a php file??

Ответить
@sideshowlol
@sideshowlol - 29.10.2020 02:45

Very helpful. Thank you. To bring this up-to-date, it's better to use xhr.responseType to set the data format and then xhr.response instead of the older xhr.responseText.

Ответить
@biljxmusics5352
@biljxmusics5352 - 01.11.2020 21:38

Will it work if i do in json file instead of php

Ответить
@pouriyanourouznejad7090
@pouriyanourouznejad7090 - 05.11.2020 06:23

Pls teach us how to coding a chat system!

Ответить
@djordjmdusan
@djordjmdusan - 18.12.2020 00:19

Is it the same process when we want to send mail, and how can we get feedback on whether the mail, was sent, or an error occurred? Do you have such a tutorial? By the way, this video is great, congratulations, keep it up.

Ответить
@kenjix3c
@kenjix3c - 18.12.2020 07:52

hello. Nice tutorial u got there. How do I send base64 without urlencoding?

Ответить
@techwithshudarsan559
@techwithshudarsan559 - 26.12.2020 12:48

Why don't you give the source code in description

Ответить
@ore_bear8045
@ore_bear8045 - 30.12.2020 15:58

405 Method not allowed, I followed exaxtly the same step. Anybody knows how fix that?

Ответить
@thengakola6217
@thengakola6217 - 07.04.2021 23:32

frickin light theme 😒

Ответить
@aaditya4998
@aaditya4998 - 05.05.2021 11:59

why is he on light mode ????????😒

Ответить
@tevinyegon7792
@tevinyegon7792 - 23.06.2021 15:45

I forgot the request header and I was wondering what's wrong. Now I Know why my data wasn't going anywhere thanks

Ответить
@theman7050
@theman7050 - 01.07.2021 16:33

Ur the man, Dom 😁

Ответить
@Samwankins
@Samwankins - 27.07.2021 17:14

Easy, nice, planned, and clear explanation. Well done pro!

Ответить
@shubhamgoyal977
@shubhamgoyal977 - 07.08.2021 08:52

Could you tell me how to do this with node instead of php?

Ответить
@mayankmaurya8631
@mayankmaurya8631 - 08.09.2021 01:31

Thank you so much, this was very helpful. I was having trouble doing this, It's 4:00am and I was really struggling thank you so much.

Ответить
@elarilio5723
@elarilio5723 - 27.09.2021 15:40

How do I use this to pass a variable that already carries a value and not give the value on the xhr.send ? and instead of <p> I'm displaying it to the value of an <input> but I don't know how , any help is well appreciated

Ответить
@FlyingwithStan
@FlyingwithStan - 24.10.2021 04:43

outstanding - thank you. you don't need to use jquery if you were just going to use it for AJAX. this video walks through exactly how to use normal javascript to do AJAX. thank you!

Ответить
@fastgeorge3104
@fastgeorge3104 - 30.01.2022 14:34

Everybody where saying jQuery was way easier than vanilla js but this video was so clear and easy to understand. Thanks!!

Ответить
@megagames9584
@megagames9584 - 10.02.2022 15:06

Hi, I have a "405 Method Not Allowed" ANY HELP PLS??

Ответить
@jigarkathiriya9198
@jigarkathiriya9198 - 06.03.2022 07:58

Than q

Ответить
@doctorkvothe3444
@doctorkvothe3444 - 04.04.2022 05:18

Not working for me :(

Ответить
@mehroj9223
@mehroj9223 - 08.04.2022 20:47

thank !!!!!

Ответить
@AtomTCP
@AtomTCP - 16.07.2022 16:52

how to keep values in form after eror in validation and after no errors redirect

Ответить
@alirezafarghadani
@alirezafarghadani - 26.07.2022 00:28

thanks is very helpful

Ответить
@anurajms
@anurajms - 06.12.2022 08:04

thank you

Ответить
@ramodsasanga6169
@ramodsasanga6169 - 05.01.2023 20:43

Thank you very much. I can't understand how you decide the header name("Content-Type") and the value("application/x-www-form-urlencoded") in setRequestHeader() method.

Ответить
@chrisrockscode1202
@chrisrockscode1202 - 25.10.2023 06:09

I swear if this just helped me with y project, you got a subscriber

Ответить