troubleshooting Question

Question regarding to $.ajax() with type "POST" vs $.post()

Avatar of Kinderly Wade
Kinderly WadeFlag for United States of America asked on
4 Comments2 Solutions158 ViewsLast Modified:
Hi Experts

I came across this scenario which I can do a post with JQuery ajax() or post(). I am not sure which one to use. I read some information from web but I believe the information wasn't correct because the website mentioned that $.post() only has success callback but I believe it has other function from this link: which mentioned that "The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods are removed as of jQuery 3.0. You can use jqXHR.done(),, and jqXHR.always() instead."

Now I am kind of confused as to which one to use. I will provide some feedback of what I am trying to do perhaps it will be easier to find the correct method for me. I have a login page that will take inputs from users (userID and password). I am trying to post the information to another page which it will validate user's input. If information is correct then it will return something  along the line of success() callback.

Rest of my pages will follow the same post structure. I need some suggestions as to which post should I use. Thanks
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros