Please navigate to the bottom of the page for Table of Contents

Saturday, June 4, 2011

jQuery AJAX functions part 3–ajax()

The $.ajax() function underlies all Ajax requests sent by jQuery. This is by far the most complex function in the jQuery library. In fact, the jQuery official documentation marks this as a low-level function and recommends using one of the high level functions (such as get(), post(), etc.). This function accepts a single argument: a set of key/value pairs that configure the Ajax request.

From an interview perspective, it is important to understand how the other higher level functions map to this function.

jQuery.Get() call is equivalent to the following .ajax() call:

$.ajax({
url: url,
data: data,
success: success,
dataType: dataType
});



jQuery.Post() call maps out to the following .ajax() call:


$.ajax({
type: 'POST',
url: url,
data: data,
success: success
dataType: dataType
});



jQuery.GetJSON() maps to


$.ajax({
url: url,
dataType: 'json',
data: data,
success: callback
});



As you can see from the above, a consistent pattern is visible. If a type is not specified, GET is used. A url is almost always required. To pass in data, you use the data name. And, you can have a callback for success. Of course, there are a lot more parameters that can be configured. A few key ones are crossDomain for cross domain access for JSONP, error for error handling function, password for authenticated requests, and so on.

149 comments:

  1. It’s too informative blog and I am getting conglomerations of info’s. Thanks for sharing; I would like to see your updates regularly so keep blogging. If anyone looking ccna just get here
    ccna training in Chennai | ccna course in Chennai

    ReplyDelete
  2. SAP is one of the customer relationship management software and it support all end to end customer related process. To know more details about SAP modules please refer the following site.
    Regards..
    SAP Training in Chennai

    ReplyDelete
  3. Wow, brilliant article that I was searching for. Helps me a lot in taking class for my students, so using it in my work. Thanks a ton. Keep writing, would love to follow your posts.
    Shashaa
    Dot Net training in Chennai | Dot Net training in Chennai | Dot Net training in Chennai

    ReplyDelete
  4. Nice Blog!!!

    IOS 7 app designs In affordable price.......

    ReplyDelete

  5. Thank you for sharing this knowledge in a blogpost.Really simple and even more effective and this worked great, very useful tips
    http://hadooptraininginhyderabad.co.in/salesforce-training-in-hyderabad/

    ReplyDelete
  6. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The angular js programming language is very popular which are most widely used.
    Angularjs Training in Chennai | Angularjs training Chennai

    ReplyDelete
  7. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Node JS training in chennai | Node JS training institute in chennai

    ReplyDelete
  8. it is very nice article thanks for sharing this article to us , it is very nice article ,
    i really like like this article because i got good info about this article thanks for sharing this article to us best regards.

    sap hana online training

    ReplyDelete
  9. It is really nice blog you should handle very wonderful words to written this blog.It help lot of fresher to update their knowledge in Angularjs. Thanks for sharing.keep sharing more blogs.


    Angularjs Online Training

    ReplyDelete
  10. Sukere InfoTech is the best high-quality vendors of search engine optimization training in Chennai with search engine optimization specialists.

    ReplyDelete
  11. Thanks for sharing this useful information.keep on posting like this.
    SEO Training in Chennai

    ReplyDelete
  12. Its a fabulous blog i have ever read in past days. search jobs near by you in chennai.

    ReplyDelete
  13. Nice information about sap. i am looking SAP HANA Online Training with real time project.

    ReplyDelete
  14. Great information, thanks for posting.

    Professional Salesforce Training in Hyderabad@ Techiemills. we offer both classroom & online training with realtime projects + placement assistance . ( for students & professionals)
    salesforce training in Hyderabad


    salesforce training in Kphb

    ReplyDelete
  15. I like the post format as you create user engagement in the complete article. It seems round up of all published posts. Thanks for gauging the informative posts.
    cara menggugurkan kandungan
    http://jualobatpenggugurkandungan.net/ obat penggugur kandungan
    http://tandatandakehamilan.net/ tanda tanda kehamilan
    http://tandatandakehamilan.net/cara-cepat-dan-selamat-menggugurkan-kandungan/ cara menggugurkan kandungan
    http://obataborsi59.com/ obat aborsi
    http://obataborsi59.com/cara-menggugurkan-kandungan-dengan-cepat-dan-aman/ cara menggugurkan kandungan

    ReplyDelete
  16. Hi There,


    Muchas Gracias Mi Amigo! You make learning so effortless. Anyone can follow you and I would not mind following you to the moon coz I know you are like my north star.

    I'm not the original poster but I'm also working on a plugin framework which is kinda working but not as I want it. I can load a interface from a jar file, for example PluginInterface.class that can execute code from the original project. But if I want to have more classes inside the jar file the PluginInterface.class can't recognize them (ClassNotFoundException) and I have to place them in the project to use the classes. So my question is, how can I load the classes to the RAM (?) so I can place the class files in the jar file instead of the project bin. I find it hard to explain how this works, so if you need any further info I can give you some. Or do you want an entirely new thread for this problem?






    Once again thanks for your tutorial.



    Thank you,
    Irene Hynes

    ReplyDelete
  17. And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.

    big data training in chennai

    ReplyDelete
  18. Pretty blog, so many ideas in a single site, thanks for the informative article, keep updating more article.
    software testing course in Chennai

    ReplyDelete
  19. "Techonolgy is updated day to day
    Thanks for sharing the info"
    salesforce Development Training Hyderabad

    ReplyDelete
  20. informative blog thanks for providing such a great information.
    Salesforce Training in Hyderabad

    ReplyDelete
  21. I wish to show thanks to you just for bailing me out of this particular trouble. As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.fire and safety engineering course in chennai

    ReplyDelete
  22. Thanks for sharing the information, Salesforce experts as lot of opennings in multi-level companies , for more information
    Best Salesforce Training in Hyderabad
    Salesforce Online Training in Bangalore

    Salesforce Online Training in India

    ReplyDelete
  23. The blog you presented was very nice and interesting which helped me to get update on the recent technologies.

    angularjs training in chennai

    devops training in chennai

    ReplyDelete
  24. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us. Do check Six Sigma Training in Bangalore | Six Sigma Training in Dubai & Get trained by an expert who will enrich you with the latest trends.

    ReplyDelete
  25. This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
    WordPress website development Chennai

    ReplyDelete
  26. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts.
    Cyber Security Projects for Final Year

    JavaScript Training in Chennai

    Project Centers in Chennai

    JavaScript Training in Chennai

    ReplyDelete
  27. Hello Admin!

    Thanks for the post. It was very interesting and meaningful. I really appreciate it! Keep updating stuffs like this. If you are looking for the Advertising Agency in Chennai | Printing in Chennai , Visit Inoventic Creative Agency Today..

    ReplyDelete
  28. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    microservices online training
    best microservices online training
    top microservices online training

    ReplyDelete
  29. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    microservices online training
    best microservices online training
    top microservices online training

    ReplyDelete
  30. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    microservices online training
    best microservices online training
    top microservices online training

    ReplyDelete
  31. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    servicenow online training
    best servicenow online training
    top servicenow online training

    ReplyDelete
  32. Hi Nice blog
    Fire and Safety is a important need in daily life. So learning about Safety is more important. Study Fire and Safety Course in Chennai. Spplimited is a professional Training Institute on providing qualified Safety training.
    For more information:
    Safety Course in Chennai
    Fire and Safety courses in Chennai
    Industrial Safety courses in Chennai

    ReplyDelete
  33. Very nice post..After reading your post,thanks for taking the time to discuss this, I feel happy about and I love learning more about this topic.
    Selenium Training in chennai | Selenium Training in anna nagar | Selenium Training in omr | Selenium Training in porur | Selenium Training in tambaram | Selenium Training in velachery

    ReplyDelete
  34. Nice One Keep doing,

    Unichrone is a professional training and certification organization,offers accredited courses PMP, CAPM, Lean Six Sigma, DevOps, Agile, ISO Courses for individuals and enterprises globally. Trainings are delivered through instructor-led classroom and online classroom training modes.

    https://unichrone.com/

    ReplyDelete
  35. Wonderful blog with great piece of information. I've been following your blogs for a while and I'm really impressed by your works. Keep sharing more such blogs. good jobs .
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    ReplyDelete
  36. Thanks for sharing this information. I really Like Very Much.
    top angular js online training

    ReplyDelete
  37. The python programming language is a modern web programming language that was originally conceived and developed by Guido van Rossum in the 1980s. Since that time, Python has evolved into a high-performance programming language that is modular and extensible. unindent does not match any outer indentation level

    ReplyDelete
  38. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    devops online training
    best angularjs online training
    top angularjs online training

    ReplyDelete
  39. This was nice and amazing and the given contents were very useful and the precision has given here is good.

    data science training institute in bangalore
    Data Science certification course in Bangalore

    ReplyDelete
  40. I am really happy with your blog because your article is very unique and powerful for new.
    Data Science
    Selenium
    ETL Testing
    AWS
    Python Online Classes

    ReplyDelete
  41. Really Nice Information It's Very Helpful All courses Checkout Here.
    data science training in noida

    ReplyDelete
  42. How much do you charge for a Statistics Assignment Help task? Take, for my case, where I need you to provide me with the Statistics Homework Help on plotting a scatter plot with a regression line? How much should that cost? Do you charge on the basis of the workload or have a constant payment?

    ReplyDelete
  43. I have submitted my assignment to your website without any challenges. The economics assignmenthelp expert handling my assignment has already contacted me and I am certain that my work is underway. I am just hoping that I will get quality economics homework help. I have a lot of hopes in you and I am just hoping that you will not disappoint me.

    ReplyDelete
  44. As much as there are discouragements, it is true that mathematics is hard. Like in my case, I was never discouraged by anyone about math but I still find it very hard and that is why I am requesting your Math assignment help. I am tired of struggling with mathematics and spending sleepless nights trying to solve sums that I still don’t get right. Having gone through your Math homework help, I am sure that I will get the right help through you. Please tell me what I need to be able to hire you.

    ReplyDelete
  45. Just what I was looking for. I am struggling with my accounting assignment. I want an Accounting Assignment Help tutor to offer me two services. One is to complete my accounting assignments and the other is to provide me with online classes. I believe you are experienced enough to offer both Accounting Homework Help and online classes. I know you charge assignments based on the bulk. Tell me how much you charge for the online classes per hour.

    ReplyDelete
  46. This concept is a good way to enhance knowledge. thanks for sharing..
    Data Science Course in Pune
    Python Classes in Pune

    ReplyDelete
  47. thank you for the information provided, we are waiting for the next info at cara menggugurkan kandungan

    ReplyDelete
  48. Fantastic website! I'd want to express my gratitude for the time and effort you put into producing this article. I expect the same level of excellence from you in the future. I wanted to express my gratitude for the excellent website! Thank you for sharing your knowledge.

    digital marketing training in hyderabad

    ReplyDelete
  49. content is very useful. I'm glad to be here.

    Trading for beginners

    ReplyDelete