post-thumb

Ajax in Django and DRF

In this tutorial we will learn all about ajax in django and implement it in DRF also too.

Asynchronous javascript and XML.

it is used to partially update the content of web page excluding complete webform.

Role of js or jquery:

it is used to handle the event in ajax processing/process , means if we select dropdown list and display data into another dropdown list, will be managed by ajax.

Role of XML:

XML means extensible markup language which is used to transfer data from client machine (brower) to server machine (apache server) and server machine to server machine.

There are two classes of XML:

1.XMLHttpRequest

These class is used to send the data from brower to web server.

2.XMLHttpResponse

These is used to get web server response using XML form.

 

Example:Create search box which will search respective records from db and show in the brower.