Buttons in web pages often use the onclick event to "attach" a
javascript function - there are no macros. Or you referring to an
application other than FrontPage?
I was trying to assign a macro to a button in Frontpage 2003. Judging by
your answer, I must be approacing it the wrong way. Can you point me to
something that would give me a step by step way to assign an action to a
button. I'm basically just trying to update a sum based on a number entered.
And like Carrie, I was trying to use a button to execute a macro to do it.
You need to add a JavaScript Math function to your form, which can be a problem if you are also
using FP Form Field Validation. You can do a search for the following:
? JavaScript Form Math function
--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
Expanding on Thomas' answer, you need to assign the math function to the
button onclick event.
<input type="button" value="Do some sums" onclick="MyMathsFunction()"
name="mathButton">
The javascript function MyMathsFunction() will contain javascript to do
the maths and write the answer somewhere (probably another form field).
The above assumes a form button is used. If the button is an image -