w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Google app engine: getting javascript variable(client side) to python string(server side)

There is another solution, which does not need javascript. Create a link to your own handler, which redirects to the query string.

Example:

<a target="_blank"
href="/redir_url?http://www.example.com/address.html">Example
address</a>

The Handler:

class RedirUrl(webapp2.RequestHandler):

    def get(self):

        url = self.request.query_string
        logging.info('user clicked ' + url)
        self.redirect(url)        




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.