Found 17 Articles for Ajax

The Pros and Cons of Using Ajax

Ayush Gupta
Updated on 27-Nov-2019 10:35:33

5K+ Views

Ajax is a set of web development techniques using many web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behavior of the existing page.Any other technology Ajax also has its own pros and cons. Let's look at some of those.Pros −Allows applications to render without data and fill data as the application gets it from the server.Gives platform independence to application developersFaster page rendersMore responsive applicationsNo rerenders of whole pages are needed to update only a single area.Cons−Any user whose ... Read More

How to keep audio playing while navigating through pages?

Samual Sam
Updated on 28-Jan-2020 10:04:22

714 Views

To continue loading audio to play while you are navigating through pages, try the following:Use Ajax to load content History API’s pushState() can also be used to alter URL without page reload. History.js should be used for consistent behavior across multiple browsers.The pushState() has three parameters: State object For new entry created by pushState() Title: You can pass a short title URL: New history entry's URL

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

Nishtha Thakur
Updated on 25-Jun-2020 07:50:35

199 Views

For cross-browser HTML File Uploader, use FileDrop. It works on almost all modern web browsers.As per the official specification −FileDrop is a self-contained cross-browser for HTML5, legacy, AJAX, drag & drop, JavaScript file upload

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

George John
Updated on 27-Jan-2020 07:26:37

146 Views

To enable HTML5 elements in IE, you need to use plugins like html5shiv. The HTML5 Shiv enables use of HTML5 sectioning elements in legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9,With that, you can also use document.createElement to create an element.var demo = document.createElement("demo"); demo.innerHTML = "Working!"; document.appendChild(demo);

Invoke a Web service from AJAX in SAP application

karthikeya Boyini
Updated on 30-Jul-2019 22:30:20

162 Views

It does not change much in SAP. How you have been doing in other projects like .NET or other, you need to incorporate the same.You need to send a POST or GET request to the intended service with the help of URL.In order to get the URL, you need to seek help from the ABAP person who would be exposing the service to fetch the WSDL file for all the details about the service.Once you have the WSDL, you can frame the request object with all required input parameters to make an AJAX call.

How to retrieve data from JSON file using jQuery and Ajax?

Amit D
Updated on 17-Feb-2020 06:53:11

6K+ Views

To retrieve data from JSON file using jQuery and Ajax, use the jQuery.getJSON( url, [data], [callback] )The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be sent to the server.callback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Let’s say we have the following JSON content in result.json file −{ "name": "John", "age" : ... Read More

Add Authentication details in the AJAX request in SAPUI5

SAP Developer
Updated on 12-Jun-2020 12:20:58

670 Views

Basically you need to exploit the beforeSend function of JQuery AJAX to sort out your requirement.Here is a basic code snippet −function AddToHeader(xhr) {     var pwd = // get the password;     xhr.setRequestHeader("Authorization", "Basic " + btoa(user + ":" + pwd)); } $.ajax({    type: "GET",    url: ,    dataType: "JSON",    beforeSend: function(xhr) {       AddToHeader (xhr);    } }).done(function(data) { /* do success logic */ }You can add further details to the header as explained in the AddToHeader method.

Advertisements