These are chat archives for cherrypy/cherrypy

5th
Feb 2017
nihilazo
@nihilazo
Feb 05 2017 17:30
Hi, I'd like to make a program with cherrypy that serves a webpage, then whenever someone clicks anywhere on the page it reports the X and Y position of the click to the program
so when the person on the site clicks it calls a function to do something, but with the X and Y positions of the click as arguments
Jason R. Coombs
@jaraco
Feb 05 2017 18:51
Luke: Most of the logic you will need to program will be client-side in Javascript. Once you determine the x/y coordinates, you want to pass those as parameters to an HTTP request to the cherrypy server, which will be something like
def click(self, x, y):
    x = int(x)
    y = int(y)
    # do something with x and y