On Sat, Jan 21, 2012 at 7:58 AM, <tinn...@isbd.co.uk> wrote: > I want to run a server side python script when a button on a web page > is clicked. This is on a LAMP server - apache2 on xubuntu 11.10. > > I know I *could* run it as a CGI script but I don't want to change the > web page at all when the button is clicked (I'll see the effect > elsewhere on the screen anyway) so normal CGI isn't ideal. > > It's easy to show a button:- > > <INPUT TYPE=submit NAME="Button" ONCLICK=something>; > > Can I get away with something clever for 'something' that will somehow > hook through to a server side script? >
Yes, use AJAX to make an asynchronous request. There are several AJAX toolkits out there that will make this simple.
-- http://mail.python.org/mailman/listinfo/python-list