Category: Ajax

  • AJAX JSON Example

    by

    in

    We can get JSON data by AJAX code. AJAX provides facility to get response asynchronously. It doesn’t reload the page and saves bandwidth. AJAX JSON Example Let’s see a simple example of getting JSON data using AJAX code. Output:Date: Time: Load Information

  • Search Example using AJAX in Java

    by

    in

    In this example, we are creating a form to search employee by name using ajax in java. Here, we have written the two-tier application code, to make the application easy to understand. You can write the database code, according to your standard. Steps to create search example using AJAX in Java You need to follow…

  • Comment Form Example using AJAX in Java

    by

    in

    In this example, we are creating a form to post comment. The form data is saved in the database and a list of all posted comments are shown below the comment form. Steps to create comment form example using AJAX in Java You need to follow following steps: Create table in database In this example,…

  • Java AJAX Email Finder Example

    by

    in

    We can create an AJAX example in Java which checks whether the given email id exists in the database or not. Steps to create email finder example using AJAX in Java You need to follow following steps: Create table in database In this example, we are using oracle 10g database. Here, we have created a…

  • Ajax Java Example with Database

    by

    in

    In this example, we are interacting with the database. You don’t have to make any extra effort. Only write the database logic in you server side page. In this example, we have written the server side code inside the index.jsp file. Steps to create ajax example with database through jsp You need to follow following…

  • Ajax Java Example

    by

    in

    To create ajax example, you need to use any server-side language e.g. Servlet, JSP, PHP, ASP.Net etc. Here we are using JSP for generating the server-side code. In this example, we are simply printing the table of the given number. Steps to create ajax example with jsp You need to follow following steps: Load the org.json.jar file download this example, we have…

  • How AJAX works?

    by

    in

    AJAX communicates with the server using XMLHttpRequest object. Let’s try to understand the flow of ajax or how ajax works by the image displayed below. As you can see in the above example, XMLHttpRequest object plays a important role.

  • Understanding XMLHttpRequest

    by

    in

    An object of XMLHttpRequest is used for asynchronous communication between client and server. It performs following operations: Properties of XMLHttpRequest object The common properties of XMLHttpRequest object are as follows: Property Description onReadyStateChange It is called whenever readystate attribute changes. It must not be used with synchronous requests. readyState represents the state of the request.…

  • AJAX Technologies

    by

    in

    As describe earlier, ajax is not a technology but group of inter-related technologies. AJAX technologies includes: HTML/XHTML and CSS These technologies are used for displaying content and style. It is mainly used for presentation. DOM It is used for dynamic display and interaction with data. XML or JSON For carrying data to and from server. JSON (Javascript…

  • Understanding Synchronous vs Asynchronous

    by

    in

    Before understanding AJAX, let’s understand classic web application model and ajax web application model first. Synchronous (Classic Web-Application Model) A synchronous request blocks the client until operation completes i.e. browser is unresponsive. In such case, javascript engine of the browser is blocked. As you can see in the above image, full page is refreshed at…