 <p>Since you're already using jQuery why not go the simple jQuery way of getting the value? </p> <pre><code>$('#serverCount').val(); </code></pre> <p>So typically when I make an ajax call where I'm expecting JSON data back and I'm sending JSON to the server. I would do something like this;</p> <pre><code>$(function() { $('a#serverCount').bind('click', function() { $.ajax({ method: "POST", url: "/url/to/your/server/method", dataType: 'json', data: { serverCount: $('#serverCount').val() } }) .done(function(msgBackFromServer) { alert("Data Sent to server" + msgBackFromServer); }); }); }); </code></pre> <p>now you'll notice the url needs to be a method that can be hit on your server, some sort or page view that you have. I'm not familiar in Flask, but I would imagine it's similar to Django in some ways. </p> <p>Method POST is because your sending data. On your flask server, you should be able to receive JSON and parse it into a Python dictionary (or maybe there is some other flask specific tool). </p> <p>Your response from this view is what is passed back to the .done function of the ajax call. This could be whatever data you want it to be. It will come from flask. I'm sure flask can send it back as a JSON object or it could just be a string. If it's a JSON object you could access different parts of it with the . notation. Something like msgBackFromServer.title or msgBackFromServer.message etc...</p>