Skip to content

Commit 05c7f9d

Browse files
author
Mehedi Hasan
committed
update the loading system
1 parent e2d6508 commit 05c7f9d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

templates/create.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ <h1>Enter the asking values!</h1>
1919
<br> <br>
2020
<input type="submit">
2121
<br> <br>
22+
<p id="state"></p>
2223
</form>
2324
</center>
2425

@@ -27,8 +28,12 @@ <h1>Enter the asking values!</h1>
2728
$(document).on('submit','#post-form',function(e){
2829

2930
e.preventDefault();
31+
$("#state").empty();
32+
$("#state").append("Sending...");
33+
3034

3135
$.ajax({
36+
3237
type: 'POST',
3338
url: "{% url 'createData' %}",
3439
data: {
@@ -37,7 +42,10 @@ <h1>Enter the asking values!</h1>
3742
csrfmiddlewaretoken:$('input[name=csrfmiddlewaretoken]').val(),
3843
},
3944
success : function(data){
40-
alert(data);
45+
//alert(data);
46+
$("#state").empty();
47+
$("#state").append(data);
48+
4149
},
4250

4351
});

0 commit comments

Comments
 (0)