Creating an AJAX Submit Form using JavaScript - Tutorial For Beginners

Creating an AJAX Submit Form using JavaScript - Tutorial For Beginners

dcode

6 лет назад

125,734 Просмотров

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


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

Saikat Ghosh
Saikat Ghosh - 06.12.2022 18:09

Thanks

Ответить
Olivia Madume
Olivia Madume - 12.11.2022 23:58

why request.open('post') and not 'put'? (very useful vid btw, thank you so much!)

Ответить
Henry Nuñez
Henry Nuñez - 18.09.2022 18:38

👏

Ответить
Shane Kanyi
Shane Kanyi - 29.08.2022 23:08

Hi, I wanted to ask how in the beginning you link the check-login.php file to the index.html file because I don't get anything on the webpage in the network tab of inspect

Ответить
DopamineSeeker
DopamineSeeker - 05.09.2021 20:04

not a secured way....

Ответить
Kartik Desai
Kartik Desai - 05.06.2021 20:22

Don😎

Ответить
Ezequiel Da Silva
Ezequiel Da Silva - 30.05.2021 00:19

Thanks you a lot, this was very clearfly

Ответить
TECH & TRICKS
TECH & TRICKS - 14.05.2021 14:24

👌👌👍👍
Please provide css file link in the description please

Ответить
Ramu Ramu
Ramu Ramu - 17.03.2021 15:10

Thanks helped a lot subscribed .

Ответить
Zoma Lee
Zoma Lee - 19.02.2021 20:12

How to pass checkbox array??

Ответить
Shawn Beans
Shawn Beans - 23.01.2021 18:10

THANKS FOR TEACHING THIS FOR FREE

Ответить
Abdurhman Alsobhi
Abdurhman Alsobhi - 19.01.2021 00:38

So no need to use header('content-type: application/json') in the php script ? is json_encode() just enough ?

Ответить
AR OFFICIAL TV
AR OFFICIAL TV - 01.01.2021 15:43

Is the username and password is already set example the dcode?

Ответить
Codecast
Codecast - 21.12.2020 02:06

You sound like Rowan from Viva La Dirt League.

Ответить
Ofir Avraham
Ofir Avraham - 01.11.2020 22:37

Hi, great tutorial. I am actually new to PHP and I am really confused about how to start writing in PHP? Which program do I need to install to get started? Thanks

Ответить
Rahul P S
Rahul P S - 07.10.2020 21:08

please help
i have issues when using mysqli functions in check-login.php
error in console "could not parse json"

Ответить
Tutun Sadhukhan
Tutun Sadhukhan - 13.08.2020 19:21

Thank u so much for such a valuable tutorials...❤❤

Ответить
Shark Sean
Shark Sean - 10.08.2020 17:29

Thank You very much! You've helped me a lot! Nothing I can do for you but subscribed your channel and give you a BIGGGG thumb! You are wonderful! Thanks!

Ответить
Zakaria Marmoud
Zakaria Marmoud - 11.07.2020 04:20

catch error ?? could not parse JSON i don't know why ?

Ответить
Omni Versal
Omni Versal - 02.07.2020 12:35

Thanks. I've been trying to use that with prepared statements to avoid sql injection attacks, your tutorial (and some research on Stack Overflow alongside with the php docs) helped me to actually understand how to pass my params into the prepared statement function. Seeing as to how bad my usage of this is because of the repetative code I have to use in my case while writing the logic for my prepared statements, I'm better off making my own php framework or something.

Ответить
sajad gholami
sajad gholami - 01.07.2020 00:46

Thanks a lot 'dcode' I learned it completely ♥

Ответить
Leslin K S
Leslin K S - 03.06.2020 16:43

if i use form tag instead of div, will the click fn work ?

Ответить
Leslin K S
Leslin K S - 02.06.2020 21:18

what you have taught us is just awesome. i told you i intend to use procedural way to submit the form after the js validation. but it is more than that. i'm gonna implement this in my project. Thanks mate!

Ответить
GabberFan
GabberFan - 01.05.2020 22:41

My current dilemma is that the form works and sends the info to the mysql database but it's all in small letters even if I'm using caps lock, I want to be able to use small and capital letters so how do I accomplish it?

Ответить
Galih Ridho Utomo
Galih Ridho Utomo - 31.03.2020 11:09

Sir i am using firebase and npm, this web not using PHP file, if you were me what would you do ?

Ответить
Abdullah Al Naiem
Abdullah Al Naiem - 26.03.2020 01:20

I did it successfully as your tutorial. I'm using it in a multi-step form. I want to hide the login form and show another module from php at that same file once $_POST data will match with php condition. Thanks in advance.

Ответить
BLOP
BLOP - 14.02.2020 07:58

Can i Integrate this with django the same way?

Ответить
Velikij Rabochij
Velikij Rabochij - 12.02.2020 20:30

Hello sir, I have question, I just watched the video and haven't tried to code it yet, but in the else statement you remove a firstChild which is already empty in the ul. My question is: Why you need to remove a firstChild if inside of a parentElement was already empty?

Ответить
Music Lovers
Music Lovers - 18.01.2020 17:28

Hello sir !!
There isn’t any short way?

Ответить
Music Lovers
Music Lovers - 18.01.2020 13:23

You are awesome dude!!
I wanna give you 100000000000000 likes!!
ThNks a lot dude

Ответить
medoo aattya
medoo aattya - 29.11.2019 00:49

thank you for this , i have problem when i try to get responseObj = JSON.parse(xhr.responseText) console log to me Unexpected token < in JSON at position 0 :(

Ответить
Logan
Logan - 25.11.2019 10:31

Hey dcode! Thanks a lot for this tutorial! I am wondering if you know a way to bypass the CORS issue I seem to be having? Every time I submit the login, it says it has been blocked by CORS policy. Thank you for your time!

Ответить
Andy Kyle
Andy Kyle - 14.11.2019 21:52

hi sir did u have tutorial using simple database for ajax tutorial

Ответить
Wonjae Hwang
Wonjae Hwang - 04.11.2019 10:55

Thanks for video what keyboard do you use? The switches sound nice

Ответить
svitir ur
svitir ur - 03.11.2019 02:51

What is the difference between using js ajax for form registration and PHP

Ответить
Daniele Sette
Daniele Sette - 05.10.2019 19:59

nice tutorial, but i can't get this code working. Every input in the login form pops out the errors "Password can not be empty!, Username can not be empty!" i don't really get whats wrong

Ответить
Better Vet
Better Vet - 07.09.2019 23:35

I have one problem --> this check-login.php is going on post as an action to server and response with answer but I had another php file going on post action and I don't know how to merge this 2 different php file and make one file to say to server as post and get them to work too
any Solution???

Ответить
c A
c A - 30.06.2019 20:31

I thought that in a registration format you need to use a database, to hash the password and then verify if its correct using PDO or mysqli...

Ответить
Tomáš Mišura
Tomáš Mišura - 10.06.2019 15:24

thanks a lot for this tutorial ! I have seen a lot of tutorials but this is one the best ones :)

Ответить
Lucas Popov
Lucas Popov - 06.06.2019 23:13

You explained it very well, thanks!

Ответить
dan brown
dan brown - 17.05.2019 16:59

Can I have ur email?

Ответить
Romain Polo
Romain Polo - 03.05.2019 20:06

Thank you !

Ответить