Tag: ajax call in javascript

ajax call

How to Create AJAX Loading Method using JQuery

In this article, you will learn How to Create AJAX Loading Method using JQuery.

Example:-

<html>
<head>
<title>AJAX Load Method in JQuery</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#div1").load("test.txt", function(responseTxt, statusTxt, xhr){
      if(statusTxt == "success")
        alert("External content loaded successfully!");
      if(statusTxt == 
ajax

How to create AJAX with PHP

In this article, you will learn How to create AJAX with PHP.

Example:-

index.php

<html>
<head>
<title>AJAX with PHP</title>
<script>
function showHint(str) {
    if (str.length == 0) { 
        document.getElementById("txtHint").innerHTML = "";
        return;
    } else {
        var xmlhttp = new