add macro to form button

  • Thread starter Thread starter Carrie
  • Start date Start date
C

Carrie

if i right click on the button...the assign macro line does not light up to
choose it.

so how do i add a macro to a button??
 
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.

Thanks,
Susan
 
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

http://www.Ecom-Data.com
==============================================
 
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 -

<a href="javascript:;" onclick="MyMathsFunction()"><img src="maths.gif"
alt="Maths Button" width="100" height="35" border="0"></a>

--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp
 
Back
Top