This is really a JavaScript technique and not a FrontPage feature.
That's why you don't find it in books about FrontPage.
The Web page at:
http://www.interlacken.com/tricks/trick09/coffeebk.htm
contains some code that does something like you describe. Perhaps you
can derive some inspiration from that.
Basically, if you have two text boxes named num and mult, you would
add this attribute to each one:
onchange="calcform();"
and then add a script like this to the <head> section:
<script>
function calcform(){
document.forms[0].ans.value = document.forms[0].num.value *
document.forms[0].mult.value;
}
</script>
where ans is the name of a third text box. However, you may need to
add some more code to make sure that both values you want to multiply
are numeric or blank, and to handle the situation where they aren't.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
"Jane Here" <
[email protected]> wrote in message
How can I use a FP2003 form to do a calculation?
Example: User enters these two fields on a form:
Number: 100
Multiply: 2.5
Now I want to display the answer: 250. How do I go about this?
BTW: I have these books on FrontPage but don't see where this sort of thing
is covered:
FrontPage 2003 Bible - Simmons and Micorosoft Office.
FrontPage 2003 - Buyens.
Any help to get me started will be appreciated.