I need to make a button with a similar functionality to “Follow” buttons in social networks. The thing is I need to refresh the page when the user clicks the button since the page content largely depends whether the user is following or not.
I could submit the “follow” with ajax and reload the page when ajax responds. Is it possible to submit data with POST without AJAX (like forms do)?
With JQuery you can do something like
And handle it from serverside like normal