Total Page Preview:   000000000155

How to perform jQuery AJAX requests?

How to perform JQuery AJAX request

  • jQuery provides the ajax() method to perform an AJAX (asynchronous HTTP) request.
  • Syntax: $.ajax({name:value, name:value, ... }). The parameters specify one or more values of name-value pairs.
    • url: this name specifies the URL to send the request to. Default is the current page.
    • success(result,status,xhr): success callback function which runs when the request succeeds
    • error(xhr,status,error): A function to run if the request fails.
    • async: Boolean value that indicates whether the request should be handled asynchronous or not. The default value is true.
    • complete(xhr,status): A function to run when the request is completed (after success and error functions are handled)
    • xhr: A function used for creating the XMLHttpRequest object
Example:
 
 
 
 
 
 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments