skip to Main Content

i am new to ajax and jquery so i dont know what is wrong in my code – Jquery ajax

I am a beginner in coding and am learning ajax but my code is not working can anyone tell me what is wrong in my code. <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $.ajax({url: "demo.txt", success: function(result){ $("#div1").html(result); }}); });…

VIEW QUESTION

my data is not posting to django rest api using ajax – Jquery ajax

somehow my data is not posting to /api/recipe/recipes/ my html {% extends 'base.html' %} {% block content %} <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Create a Recipe</title> </head> <body class=""> <form> {% csrf_token %} <br>…

VIEW QUESTION
Back To Top
Search