<div class="gmail_quote">On Sat, Jan 21, 2012 at 7:58 AM, <span dir="ltr"><<a href="mailto:tinnews@isbd.co.uk">tinnews@isbd.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I want to run a server side python script when a button on a web page<br>
is clicked. This is on a LAMP server - apache2 on xubuntu 11.10.<br>
<br>
I know I *could* run it as a CGI script but I don't want to change the<br>
web page at all when the button is clicked (I'll see the effect<br>
elsewhere on the screen anyway) so normal CGI isn't ideal.<br>
<br>
It's easy to show a button:-<br>
<br>
<INPUT TYPE=submit NAME="Button" ONCLICK=something>;<br>
<br>
Can I get away with something clever for 'something' that will somehow<br>
hook through to a server side script?<br></blockquote></div><br>Yes, use AJAX to make an asynchronous request. There are several AJAX toolkits out there that will make this simple.<br><div style id="avg_ls_inline_popup">
</div><style type="text/css">#avg_ls_inline_popup{position: absolute;z-index: 9999;padding: 0px 0px;margin-left: 0px;margin-top: 0px;overflow: hidden;word-wrap: break-word;color: black;font-size: 10px;text-align: left;line-height: 130%;}</style>