Ajax

Sample Ajax GET/POST Request in Django

Let us make a test scenario here: A dropdown field which on change we are going to send a Get/Post request to Django and return response. Let us start coding.... <select id="select_dropdown"> <option value='joshua'>joshua</option> <option value='peter'>peter</option> .... .... </select> Let's make an Ajax request after the change in the dropdown field. $(document).ready(function(){ $('#select_dropdown').change(function(){ var e = document.getElementById("select_dropdown"); var value = e.options[e.selectedIndex]…

Keep reading