Edit: forget the rest of the post, it works
I put this line
<button type="button" id="Something">Something</button><br/>
instead of this in the "Guess my number":
Enter number: <input type="text" id="txtNumber"></input>
<button type="button" id="btnGuess">Guess!</button><br/><br/>
<button type="button" id="btnReset">Reset secret number</button><br/>
And added this before </body> :
<script type="text/javascript">
$("#Something").click(function(){
$.post("Something");
});
</script>
But the button does not appear in the page. I don't see where it is added elsewhere, unless in the style part (? ).
In the server I added this line:
srvr.AddHandler("/Something", "Something", False)
and added a handler class named "Something" which has to do the rest (but is not reached yet).
Edit:
In another trial I left the index.html as is and added these lines in getimages before the loop:
resp.Write("<button type=button id=Something>Something</button><br/>")
resp.Write("<script Type=text/javascript>$(#Something).click(function(){$.post(Something);});")
Now I see the button but it is not activating the handler yet.