Ajax Articles

Found 15 articles

How is Ajax different from JavaScript Libraries and Run Time Environments?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 402 Views

This article explores AJAX (Asynchronous JavaScript and XML) and clarifies how it differs from JavaScript libraries and runtime environments in web development. AJAX Introduction and History Ajax, short for Asynchronous JavaScript and XML, is a technique for creating dynamic and interactive web applications. It was first introduced in the early 2000s and has since become a staple of modern web development. The key feature of Ajax is its ability to update parts of a web page without requiring a full page reload. This is achieved by using JavaScript to send and receive data from a server asynchronously, ...

Read More

Explain the different ready states of a request in AJAX

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 3K+ Views

AJAX stands for Asynchronous JavaScript and XML. It is a set of web development techniques to create interactive web applications. AJAX allows a web page to communicate with a server without reloading the page. Ready states are an important part of working with AJAX requests. The ready state of a request indicates the request's status to the server and allows the client to track the progress of the request through the readyState property of the XMLHttpRequest object. In the below sections, we detail the different ready states of AJAX requests. UNSENT STATE (0) This is the ...

Read More

How to "enable" HTML5 elements in IE 8 that were inserted by AJAX call?

George John
George John
Updated on 15-Mar-2026 348 Views

To enable HTML5 elements in IE 8 that were inserted by AJAX calls, you need to use plugins like html5shiv and manually create elements using document.createElement. The HTML5 Shiv enables use of HTML5 sectioning elements in legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9. The Problem IE 8 doesn't recognize HTML5 elements like , , or . When these elements are inserted via AJAX, they won't render properly even with html5shiv loaded. Solution: Manual Element Creation You need to call document.createElement for each HTML5 element before inserting AJAX content: ...

Read More

Cross-browser drag-and-drop HTML file upload?

Nishtha Thakur
Nishtha Thakur
Updated on 15-Mar-2026 374 Views

Cross-browser drag-and-drop file upload can be challenging due to browser differences. Modern browsers support the HTML5 File API, while legacy browsers require fallback solutions. HTML5 Drag and Drop API Modern browsers support native drag-and-drop using the HTML5 File API: Drop files here const dropZone = document.getElementById('dropZone'); // Prevent default drag behaviors ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { dropZone.addEventListener(eventName, preventDefaults, false); }); function preventDefaults(e) { e.preventDefault(); e.stopPropagation(); } // Handle drop dropZone.addEventListener('drop', handleDrop, false); ...

Read More

How to keep audio playing while navigating through pages?

Samual Sam
Samual Sam
Updated on 15-Mar-2026 1K+ Views

To keep audio playing while navigating through pages, you need to prevent full page reloads that would interrupt playback. Here are the main approaches: Method 1: Using AJAX with History API Load new content dynamically without refreshing the page using AJAX combined with the History API's pushState() method. Continuous Audio Example ...

Read More

Send multiple data with ajax in PHP

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 6K+ Views

In PHP web applications, you often need to send multiple data values through AJAX requests. This can be accomplished using different data formats and methods depending on your requirements. Method 1: Sending JSON Data You can send multiple values as a JSON object by specifying the content type and structuring your data accordingly − var value_1 = 1; var value_2 = 2; var value_3 = 3; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "your_url_goes_here", data: { data_1: value_1, data_2: value_2, ...

Read More

Invoke a Web service from AJAX in SAP application

karthikeya Boyini
karthikeya Boyini
Updated on 13-Mar-2026 331 Views

Invoking web services from AJAX in SAP applications follows the same principles as other web technologies like .NET. The main difference lies in how you obtain the service details and configure the connection. You need to send a POST or GET request to the intended service using the appropriate URL endpoint. Getting the Service URL and Details To get the service URL, you need to work with the ABAP developer who is responsible for exposing the web service. They will provide you with the WSDL (Web Services Description Language) file that contains all the necessary details about ...

Read More

Add Authentication details in the AJAX request in SAPUI5

SAP Developer
SAP Developer
Updated on 13-Mar-2026 1K+ Views

In SAPUI5, when making AJAX requests that require authentication, you need to exploit the beforeSend function of jQuery AJAX to add authentication details to the request headers. This is commonly required when accessing secured backend services or APIs. Here is a basic code snippet that demonstrates how to add Basic Authentication to your AJAX request − function AddToHeader(xhr) { var user = "your_username"; // Define the username var pwd = "your_password"; // Get the password ...

Read More

How to use simple API using AJAX?

Abhishek
Abhishek
Updated on 20-Nov-2023 465 Views

AJAX or Asynchronous JavaScript and XML is a set of existing technologies like: Asynchronous JavaScript and XML. AJAX helps us to fetch the data from any local database or any API without interfering with the existing page. It will fetch the data without reloading the page and without any interruptions. Process of sending the AJAX request to any server. Step 1 − In the first step, we will instantiate a XHR object using the XMLHttpRequest() as shown below − const xhr = new XMLHttpRequest(); Step 2 − In the next step, we will open the ...

Read More

How to demonstrate the use of Ajax loading data in DataTables?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 05-May-2023 2K+ Views

In the realm of web development, the ability to efficiently load data using Ajax can be a game-changer for user experience. DataTables, a powerful jQuery plugin for creating dynamic and responsive data tables, offers a straightforward approach to incorporating Ajax loading into data tables. However, some developers may find the process of integrating Ajax loading into their DataTables challenging. In this article, we will explore the step-by-step approach to demonstrating the use of Ajax loading data in DataTables, delving into the underlying concepts and syntax necessary for success. By following this guide and utilizing the various parameters available within DataTables, ...

Read More
Showing 1–10 of 15 articles
« Prev 1 2 Next »
Advertisements