4: How to use get and post methods in jQuery AJAX - Learn AJAX programming

  Рет қаралды 315,491

Dani Krossing

Dani Krossing

Күн бұрын

When to use AJAX get and post using jQuery - Learn AJAX programming. In this lesson we will learn about get and post functions within jQuery AJAX.
--
mmtuts is a KZbin channel that focuses on teaching beginner and advanced courses in various multimedia related skills.
We plan to make tutorials available on programming, video production, animation, graphic design, and on software such as the Adobe Creative Cloud programs.
AJAX for beginners is a how to series that teaches AJAX to people who are just starting out learning programming. The course teaches how AJAX scripting can be made easy and teaches how to create instant loading on your website withour needing to refresh the browser each time, and much more. Creating dynamic websites with AJAX is easy and should not be seen as otherwise, which is why we want to explain the language in a easy to understand way for beginners.
If you have suggestions on new courses, or specific lessons within existing courses you would like to see, then feel welcome to submit them in the comment section or in a private message. ALL suggestions will be seen, but not all will be replied to since we get quite a few every day.

Пікірлер: 137
@vimalupadhyay1883
@vimalupadhyay1883 6 жыл бұрын
Finally i could solve my project issue with this video, thanks brow, u did good job
@aabedkashwa9125
@aabedkashwa9125 5 жыл бұрын
@pak tube this means: access the $_POST[ ] and see if there is set any request named 'suggestion' then do the following ...
@mohalimohali1874
@mohalimohali1874 3 жыл бұрын
You got a job with not knowing that!
@tylancoleman2862
@tylancoleman2862 5 жыл бұрын
Is it bad my friend hired me coding after 60 days of learning. I'm litterally learning while doing! These videos are my life line haha.
@jackfrost8969
@jackfrost8969 5 жыл бұрын
what eactly you learned ?
@anweshachakraborty8029
@anweshachakraborty8029 5 жыл бұрын
amazing video, after seeing this video all programming running absolutely perfect, completely helpful tutorial, want more videos on ajax
@fares.abuali
@fares.abuali 3 жыл бұрын
Thanks! Finally I understood AJAX
@mbt_tasin
@mbt_tasin 3 жыл бұрын
thank you sir thank you very much it help a lot now i can resume my project again
@asifpatel9982
@asifpatel9982 4 жыл бұрын
in the first video of this series...you said we can make a chat box with AJAX......can you make a video about it...i love and really need to learn how to make a chat box...
@mariocalcetin7602
@mariocalcetin7602 4 жыл бұрын
Thank you very much friend, I did not understand much about the subject but you do it in a very detailed way. greetings from Chile .
@amajarijauhari1856
@amajarijauhari1856 2 жыл бұрын
usefull tutorial
@insPIreMath
@insPIreMath 2 жыл бұрын
Thanks a bunch bro!
@eslamminshawy5824
@eslamminshawy5824 6 жыл бұрын
very articulate, very useful . I guess I will use this method in the search ,thnx alot .
@teachercarlosmayo1215
@teachercarlosmayo1215 5 жыл бұрын
This is an excelent video. You are an excellent teacher! I enjoyed your explanation a lot. Thank you very much.
@patrickbroaden9820
@patrickbroaden9820 3 жыл бұрын
Solid...💪🏾
@richardbakosalamassou8359
@richardbakosalamassou8359 2 жыл бұрын
thank too much Dani, helps me a lot
@asense7289
@asense7289 5 жыл бұрын
best teaching style ever.....
@aimlezz8855
@aimlezz8855 3 жыл бұрын
Awesome. Thanks brother.
@ali2hassan2
@ali2hassan2 5 жыл бұрын
thanks a lot, you've been really helpful
@iosfactory
@iosfactory 2 жыл бұрын
Dani Thanks !
@AboudUranium
@AboudUranium 2 жыл бұрын
Bro you saved me 🙂
@goldorackconceptionwebmark4319
@goldorackconceptionwebmark4319 3 жыл бұрын
keep it up youre the best man ! thank you for your videos ! greeting from Quebec !
@bcdeveloperc6142
@bcdeveloperc6142 4 жыл бұрын
thank you, been looking for ajax that won't give CORS errors
@sajid30k61
@sajid30k61 Жыл бұрын
thank you so much
@whatskookin6429
@whatskookin6429 3 жыл бұрын
Dani, thank you so much! this video is actually helping me a lot to go through some challenges in my internship 👍
@mibrahim4245
@mibrahim4245 2 жыл бұрын
LEGEND !
@HongKong1842
@HongKong1842 3 жыл бұрын
Thanks. This is a very simple demo and helpful.
@SerenityWaves2.0
@SerenityWaves2.0 7 жыл бұрын
Hey man can you make a tutorial about How to insert data into database using ajax
@CHRISCANHAMC4NH4M
@CHRISCANHAMC4NH4M 5 жыл бұрын
@Ni3Y yes you can ...
@CHRISCANHAMC4NH4M
@CHRISCANHAMC4NH4M 5 жыл бұрын
@Ni3Y I was arguing what is possible not what is safe ... ;)
@CHRISCANHAMC4NH4M
@CHRISCANHAMC4NH4M 5 жыл бұрын
@Ni3Y I agree it's not safe but it is possible. That's all, no need to get defensive ...
@CHRISCANHAMC4NH4M
@CHRISCANHAMC4NH4M 5 жыл бұрын
@Ni3Y nope, what's that??
@fash9340
@fash9340 3 жыл бұрын
In the near future, I would love to donate something to you. You are amazing at explaining and sharing your knowledge for free with us should be apprictaed. Even as a student I would love to do something in return for you.
@27plays
@27plays 6 жыл бұрын
Amazing simplified
@vatsaljoshi4390
@vatsaljoshi4390 6 жыл бұрын
awesoem tutorial thanks bro!
@AZnuclear
@AZnuclear 5 жыл бұрын
Thanks man, that was a really nice video!!
@ahmaddeab7723
@ahmaddeab7723 5 жыл бұрын
That is really awesome ! Thanks
@bigcato5840
@bigcato5840 5 жыл бұрын
really amazing vids and explaination dude.. helps a lot... thanks
@mohalimohali1874
@mohalimohali1874 3 жыл бұрын
I learned all the key essential points but forgot in one to one interview, still can do excellent in written, looking for jobs any tips that could help
@PanCakeMixer101
@PanCakeMixer101 4 жыл бұрын
awesome tutorial my man!
@israelhb2065
@israelhb2065 5 жыл бұрын
Very easy to understand! Thank you so much! :D
@anitha2053
@anitha2053 4 жыл бұрын
wow what an explaination.!let me subscribe you first.
@Tracks777
@Tracks777 7 жыл бұрын
Good video! Keep it up!
@khokhokhoskinstore2435
@khokhokhoskinstore2435 5 ай бұрын
Your video is helpful for me, but when i try to use ajax method, it doe not work at all, other jquery method still work well except ajax. Can you give me some advise ?
@arinkaramian946
@arinkaramian946 7 жыл бұрын
this video was awesome thank you !
@ScottUmble
@ScottUmble 6 жыл бұрын
Incredible. Love your videos!
@CarAudioInc
@CarAudioInc 3 жыл бұрын
I understand what's happening, just wish I could remember all those damn statements. Thanks for sharing lol
@Dani_Krossing
@Dani_Krossing 3 жыл бұрын
No one remembers them straight away. They start sticking with repetition 😉
@oranbenavi
@oranbenavi 5 жыл бұрын
Amazing!!!
@brianbantigue3625
@brianbantigue3625 5 жыл бұрын
thank you man you amazing!
@jasononey
@jasononey 5 жыл бұрын
it would be really nice for you to provide download of your completed files for us to use in testing...
@Dexter101x
@Dexter101x 6 жыл бұрын
Can you do a tutorial on how to get images from folders using AJAX?
@OSPPRO
@OSPPRO 6 жыл бұрын
thank you sir . this is realy cool
@DanielWeikert
@DanielWeikert 7 жыл бұрын
Thanks for the video. One Question. I used node.js to create a live server in chrome. However when i run the code and post to the php file I receive an error POST 127.0.0.1:8080/suggestions.php 405 (Method Not Allowed). Any ideas? Thx
@aczerobilly
@aczerobilly 2 жыл бұрын
I got this too, any ideas on how to fix this?
@LemmorNuique
@LemmorNuique 7 жыл бұрын
Thank you Daniel
@marcroube313
@marcroube313 3 жыл бұрын
What microphone and preamp are you using? The audio quality is excellent
@Dani_Krossing
@Dani_Krossing 3 жыл бұрын
Haha kind of you to say 😅 I'm using the AT2020 USB mic, which is excellent and I still use today. 🙂 But let's be honest here... I have a LOT of echo going on in this video, because I had no sound dampening on my wall. 😂
@subratkumarbarik8896
@subratkumarbarik8896 2 жыл бұрын
Can you please explain how to enable CORS in ajax calls?
@HongKong1842
@HongKong1842 3 жыл бұрын
The plus2 method is simple. Yet, it looks like it refreshes from the record-1 till the total to be loaded. So it prints 2 records, then start over and print 4, then start over and print 6 ... but the loading effort is getting heavier. Is there a way to only read and append, for example, record-3and4, then record-5and6, etc?
@brahimchai9721
@brahimchai9721 5 жыл бұрын
easy explaining.
@bcdeveloperc6142
@bcdeveloperc6142 4 жыл бұрын
Since we have to run on a server of our choosing to not get CORS errors, @MMttuts ? Does that mean that ajax shouldn't be run client side? how do we make it run client side without CORS errors? what are the best practices on this? whats the best way to run ajax client side?
@ahmedcherif1350
@ahmedcherif1350 2 жыл бұрын
say I want to specify witch input where this is gonna happen,how can I do so,(my site have many inputs).
@arminharper510
@arminharper510 4 жыл бұрын
thanks for the tut but there is one thing that i don't understand,the way your script auto-fills the name you are entering, is that happening automatically due to how Jquery classes for AJAX are written? or did u somehow specify this in your Javascript?
@wesleyess9332
@wesleyess9332 7 жыл бұрын
Hey Daniel, i was wondering what would be a good way to program a small live chat system for my website ? Hope you can give me some tips!
@amoghdatar2726
@amoghdatar2726 6 жыл бұрын
*Wesley Ess HTML, CSS, jQuery, PHP, MySQL, And Obvious:* *_AJAX_*
@xionaplays
@xionaplays 4 жыл бұрын
!== FALSE is the same as == TRUE, right? or is there something I'm missing?
@ahmadgalamli
@ahmadgalamli 4 жыл бұрын
If it isn't FALSE it could be NULL or TRUE. So it doesn't mean != FALSE is 100% ==TRUE. :)
@amarewondimnew26
@amarewondimnew26 3 жыл бұрын
How do we do the work on the loaded page? For example, if it is a registration form.
@achmadyogiprakoso1739
@achmadyogiprakoso1739 7 жыл бұрын
awesome video. Thanks a lot for the tutorial. I'd like to know how if the input is "select option". I tried the same way but it seemed not working, I also tried using 'id' but still failed. Hope your answer, please.
@zdrave9154
@zdrave9154 6 жыл бұрын
What you want to have inside your select with options? I do not get your idea, please explain.
@vatsaljoshi4390
@vatsaljoshi4390 6 жыл бұрын
good ajex playlist please add some more videos on ajex in this play list
@jonathancelebrado4625
@jonathancelebrado4625 6 жыл бұрын
what if I have many inputs? which attribute should I put inside the selector?
@Fasshow28
@Fasshow28 6 жыл бұрын
Bro' my application is different, i want to have an html that connect with my database table, and witouh refreshing change the data, what i mean... i have a table with 2 columns, when i update my table, i want the website change the data too, without refreshing, how can i do that?
@ahmoahmic1393
@ahmoahmic1393 5 жыл бұрын
Can you do the same video with database
@CENTCI
@CENTCI 7 жыл бұрын
good
@tauplayz
@tauplayz 2 жыл бұрын
hi,what if I want to determine what the button submits ,say I have 3 buttons with IDs fruit1,forwad and show ,when you click on fruit1 the infomation in show (an image and image name) must be put in the button with id "forwad" on the same page. I Tried this but can't get anything function myonclickfn(){ document.getElementById('fruit1').onclick=function(){ $.ajax({ type: "POST", url: $("#forwad"), data: $("#show"), }); }; } ;
@mayurgudi381
@mayurgudi381 5 жыл бұрын
if var name would have been array then passing suggestion is valid ? and if valid ... in php file how to retrieve it ? according to index value
@angelodelacruz9508
@angelodelacruz9508 4 жыл бұрын
Hey is it possible that you will use get and post in a two website
@luizmatthew1019
@luizmatthew1019 5 жыл бұрын
What if you have more than one input? How do you make sure data from one input isn't being sent to the php post function of the other?
@aanya4818
@aanya4818 3 жыл бұрын
Reading important 17:00 onwards
@12vLife
@12vLife 4 жыл бұрын
is this possible between two pages/forms on different domains/servers?
@randomcancername5402
@randomcancername5402 3 жыл бұрын
When i try the exact example from the video the request gets blocket by the cors policy. Can someone tell my how i can work around that so i can actually try to get this tutorial to work? edit: I'm also explicitly refering to the part with the get request. I have not yet done anything with te post method.
@einsteinwallah2
@einsteinwallah2 Жыл бұрын
how do you handle cors error?
@Imufur
@Imufur 3 жыл бұрын
I was a bit confused thinking this was supposed to be one "username already exists" thing, its just for suggestion, ok got it
@timfetter6846
@timfetter6846 3 жыл бұрын
I get no output and no errors and I can't find a syntax error. Do you have finished code to diff?
@abdulsamadmuyideen8517
@abdulsamadmuyideen8517 Жыл бұрын
Please how do I post the input password to get encrypted in my JavaScript encryption then post to the database
@chandlerzhu9735
@chandlerzhu9735 2 жыл бұрын
at 6:10 why does it alert the message before changing the html, in the function alert happens last
@Rafael-es5dp
@Rafael-es5dp 4 жыл бұрын
How can I search the data without being case senstive? Because I tried having a data that starts with capital letter example Saint, when i type saint it wont appear. Help please
@gabrielarayagarcia1607
@gabrielarayagarcia1607 4 жыл бұрын
What's append with Django? where the $.post(,...is seeking in urls.py.Your video shows an external file (suggestions.php)
@srinath29devkate
@srinath29devkate 5 жыл бұрын
How to send headers in post or get ? And how to post file types
@MrVimkaf
@MrVimkaf 3 жыл бұрын
Hey Dan, will you still recommend jQuery in 2021
@alexandertarasenko3038
@alexandertarasenko3038 6 жыл бұрын
what if I need to separate my script from html? How to do it right? In the video with comments, for example it didn't work.
@cedric_ds
@cedric_ds 6 ай бұрын
I don't understand, why you are using .post() instead of .get() to get the name suggestions, you are not modifying anything on the server, right?
@Kishi1969
@Kishi1969 7 жыл бұрын
Can you develop a full application either CMS/Social Media/E-commerce/ Job Portrail with full using PHP/Mysql/HTMl/CSS without using any plugging , just from Scratch
@javierquiroga6774
@javierquiroga6774 6 жыл бұрын
Bro! it would take forever to finish a project like this that's why there are many plugins to get it done faster.
@jalalgang7357
@jalalgang7357 4 жыл бұрын
the ajax is not working for me but the normal post method does work
@omranshahrour7291
@omranshahrour7291 2 жыл бұрын
Come on .. the most useful example of AJAX is dependent drop down lists, I mean when you have multiple dropdownlists and each one is linked to the previous one. for example if the first one loads countries from database, the second one will load the cities that match the inserted country without refreshing (onchange) and the third will load districts and so on.. I didn't find an easy tutorial to exploain how we could do it since I don't prefer jQuery by the way
@tayyabmanzoor4023
@tayyabmanzoor4023 5 жыл бұрын
I want laravel tutorials,,,,,,,,,,,,,,,,
@androgengame4689
@androgengame4689 4 жыл бұрын
Can you help in my project of chat room system
@roshanmef9301
@roshanmef9301 2 жыл бұрын
In the thumb, you don't look like you're ['GET']ing methods, you look more like you're ['AVOID']ing method
@ayouballa9964
@ayouballa9964 4 жыл бұрын
i don't know why post work like get? i use post and it shows the information in url Why???
@sunnysheikh2951
@sunnysheikh2951 5 жыл бұрын
facing a error $.get is not a function all code is ok , can any body help ?
@cbtube1191
@cbtube1191 4 жыл бұрын
Easy so i can make it without click button and boom! If anyone comment the comment will be shown that's easy but i have problem for now it's not like i will create a table for every post so how can I solve this should I make create table fun for every comment or create post id and search function for thr id
@SteamingPilot
@SteamingPilot 5 жыл бұрын
At 15:42 why did you use !== false instead of == true?? isn't that the same thing? I tried to use == true, But the code didn't seem to run correctly, why?
@icantsurf89
@icantsurf89 5 жыл бұрын
Try using 3 ='s, === instead of 2.
@josenildotiago4460
@josenildotiago4460 4 жыл бұрын
CORS origin?
@linhdinhvan7341
@linhdinhvan7341 6 жыл бұрын
hi bro..im beginner. why am i 'Failed to load file:///C:/Users/Admins/Desktop/text.txt: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.' ?????helpmeple
@linhdinhvan7341
@linhdinhvan7341 6 жыл бұрын
he... i fixed... i'm run: localohost/text.txt in WWW of Appserv, instead of double click to file html.. ^^. Ths
@iqbalhossain4878
@iqbalhossain4878 6 жыл бұрын
awesome but lower case does not working
@rameezkhan3641
@rameezkhan3641 6 жыл бұрын
looks like ur names in array are sexist "$exist.." :P
@Dani_Krossing
@Dani_Krossing 6 жыл бұрын
Hehe good one ;)
@briguy9915
@briguy9915 5 жыл бұрын
Yeah, and I imagine that Jane makes 33% less than Daniel, Dennis, and Danny.....
@calin6327
@calin6327 5 жыл бұрын
@@briguy9915 Yeah, right... -,-
@BloodyClash
@BloodyClash 4 жыл бұрын
strpos is not the best function to use here. this way it even would say that the name Dan is given even though Daniel is given but not Dan. Better use in_array("Daniel", $arrayname)...that way you also don't need a foreach loop every time you type anything
@justinjose9618
@justinjose9618 4 жыл бұрын
$.post("insert.php",{user:User,password:Password}, function(data,status){ document.getElementById("output").innerHTML = "post staritng"; // } ); but this didnt work
@ramsa5246
@ramsa5246 3 жыл бұрын
ok
@otrwalter
@otrwalter 6 жыл бұрын
What is the next episode?
@aberaouzismail3666
@aberaouzismail3666 6 жыл бұрын
I really appreciate your work .... but I think it's better to speak with an easy English .... not like a native speaker because you have a lot of followers from many countries...... thanks a lot
5: How to validate a form using AJAX - Learn AJAX programming
35:27
Dani Krossing
Рет қаралды 191 М.
JSON and AJAX Tutorial: With Real Examples
40:45
LearnWebCode
Рет қаралды 1,8 МЛН
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 16 МЛН
Самое неинтересное видео
00:32
Miracle
Рет қаралды 1,2 МЛН
When you discover a family secret
00:59
im_siowei
Рет қаралды 34 МЛН
Cute kitty gadgets 💛
00:24
TheSoul Music Family
Рет қаралды 21 МЛН
JSON Crash Course
24:49
Traversy Media
Рет қаралды 1 МЛН
Async JavaScript Part 1: What is AJAX?
21:25
Code with Ania Kubów
Рет қаралды 119 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
Always Check for the Hidden API when Web Scraping
11:50
John Watson Rooney
Рет қаралды 624 М.
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 16 МЛН