I'll step in for the easy part:
<input type="button" value="Update Percentages" onclick="javascript: yourFunction();" />
M.<input type="button" value="Update Percentages" onclick="javascript: yourFunction();" />
M.