Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

AJAX Crash Course

What is AJAX ?

  • Asynchronous Javascript & XML
  • Set of web technologies
  • Send & receive data asynchronously
  • Does not interfere with current web page
  • JSON has replaced XML for the most part

Why XmlHttpRequest (XHR) Object is Used ?

  • API in the form of an object
  • Provided by the browser’s JS environment
  • Methods transfer data between client/server
  • Can be used with other protocols than HTTP
  • Can work with data other than XML (JSON, plain text)

How to retrieve data from sample.txt files through AJAX?

First of all, you should create an ajax1.html and one sample.txt file. then copy and paste the below codes to view the result. for below code testing. place the file in htdocs folder of xampp and open URL like this: http://localhost/ajax/ajax1.html

ajax1.html

sample.txt

How to retrieve data from json files through AJAX?

there are some example code for this. so you can check out below:

ajax2.html

users.json

How to retrieve data from external API through AJAX?

please look the codes of ajax3.html and url of external source i.e : https://api.github.com/users

How to retrieve data from database through AJAX?

users.php

there are 4 examples explained above for retrieving data from different locations by the help of Ajax. so this example are very easy to understand and apply it to your project easily. so if you hava any confusion then watch this video: Link .

Thanks for supporting us. if you like this blog then share with your friends.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
MotoShare.in provides the perfect two-wheeler for every occasion—daily commuting, weekend escapes, tourist exploration, or test-riding your dream bike. Simplify your mobility with us!

Related Posts

What is JavaScript and use cases of JavaScript?

What is JavaScript? JavaScript is a programming language that is used to create interactive user interfaces and dynamic web pages. It is a client-side language, which means…

Read More

Complete guide of JavaScript certification courses, tutorials & training

What is JavaScript Every time a web page does more than simply sit there and display static information for you to look at, such as when it…

Read More

Complete JavaScript with AngularJS and NodeJS Certification Guide & tutorials

What is JavaScript with AngularJS and NodeJS? JavaScript was introduced as LiveScript, but Netscape converted its name to JavaScript. JavaScript is a dynamic computer programming language. It…

Read More

Best & Most Popular 5 Code Editors for JavaScript programming

JavaScript is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. JavaScript’s syntax is heavily inspired by C++ and…

Read More

Top 50 interview question and answers for JavaScript

JavaScript could be a scripting or artificial language that enables you to implement advanced options on websites each time an internet page will quite simply sit there…

Read More

TOP 250+ INTERVIEW QUESTIONS FOR JAVA

Here we will cover the basic, intermediate and advance level interview questions for java. Also we will cover the question related to java script. Java Basic interview…

Read More