H
H
hardwellZero2015-03-09 10:21:57
JavaScript
hardwellZero, 2015-03-09 10:21:57

How to make a request using AJAX?

Hello.
You need to write an AJAX script that will change the value in a field in the database. (The default is 0)
You need to add 1 to the like field by clicking the button.
And so for each post separately. I know the post id.
DB structure:

-Commentary
---id
---text
---author
---post_id
---like

I dug up a few links:
www.techillumination.in/2014/08/python-flask-and-j...
www.giantflyingsaucer.com/blog/?p=4310
But since I am not familiar with AJAX, I ask for help in writing a script which will send the post id, and in the route I will make a selection and change the value of the field.
My complete code can be found here - https://github.com/4doge/askMe
Any help would be greatly appreciated.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alim Alibaev, 2015-03-09
@a4gg

Everything is clearly explained here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question