1def post_note(request,id):
2 post_id = request.GET['note']
3 print(post_id)
4 //sql insertion code,once its done i want to notify to the front end..print some alert message.
5 return render(request, './profile.html')
6
1$('#tn1').click(function(){
2 var msg='';
3 alert('inside alert');
4 if ($('textarea#message') != "") {
5 var message = $('#notesarea').val();
6 alert(message);
7 msg=message;
8 }
9
10
11 $.ajax({
12 url: 'post_note',
13 data: {
14 'note': msg
15 },
16
17 success: function (data) {
18 alert(data)
19 }
20 });
21