Thank you, David. Actually, what I needed was the code syntax, but your kind response confirmed that I was on the right track. Through trial and error I worked out the syntax. For Richard Bailey, who also expressed interest in the solution, here is what worked in this case --
1. Include the onclick keyword in the short name of the html button question (in this case, I changed the short name from CalcCost to CalcCostonclick). Including the onclick keyword in the shortname enables the onclick JavaScript to execute when you click the html button (instead of defaulting to the onblur script).
2. Then place something like this client side scripting code in the Advance Field Options to be executed when the html button is clicked:
if ($(CalcCostonclick))
do this
else
do that
Thanks again, David.