Maybe you could use javascript to call the php script passing the function name and then using variable functions to call it.
//phpfunction.php:
<?php
function php_function(){
//code
}
if isset($func_call) $func_call();
?>
<input type="button" onClick="window.navigate('a href="phpfunction.php?func_call=php_function')">
Not too sure about the javascript side though. It should work, the only downside being the page would reload when the button is clicked.