After the user enters data on my home page, I want to send the values ββto the google python script application engine for processing. When the processing of the script is complete, I want it to pass the values ββback to my home page, which will display the results at the bottom of the page. Since I do not want to reload the whole page, I want to use jquery when the user ends up in submit.
I have 2 questions 1) How to transfer the results to my homepage from python 2) In my $ .ajax call, how do I specify the name of a python script that will handle the processing
jquery code $(function() { $("input#Submit").click(function() { $.ajax({ type: "POST", url: "/", //my python script data: { var1: $("input#var1").val(), var2: $("input#var2").val() }, success: function(returnData){ alert(returnData) } }); }); python script class processInfo(webapp.RequestHandler): var1 = self.request.get("var1") var2 = self.request.get("var2") do some processing here eg var 3 = var1* var2 how do i return var 3 back to the $.ajax call? application = webapp.WSGIApplication( ('/', processInfo), debug = true)
source share