Did you add the total field to your form and on the confirmation page
<input type="hidden" name="Total" value="0">
- move it to right after the FORM tag in the form (before your other fields
| TY Stefan.
|
| I tried that.Here's the code
|
|
| <input type="hidden" name="Total" value="0">
| <input type="hidden" name="constant" value="20">
| <input type="text" name="amt" size="9"
| onblur="this.form.Total.value = parseInt(this.form.constant.value) +
| parseInt(this.amt.value)" >
|
| The result I am getting is zero. The amt and constant are displaying
| correctly in my confirmation page.
|
| What do you suggest?
|
| Thanks
|
| Russell
|
|
http://www.eastnorwich.org/joinus.htm
|
|
|
|
|
|
|
| | > Convert your values to integers using parseInt
| >
| > <input type="text" name="amt" size="9" onblur="this.form.Total.value =
| parseInt(this.form.constant.value) +
| > parseInt(this.amt.value)" >
| >
| > Above all on 1 line
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| | > | Thanks Stefan,
| > |
| > | It almost works. What I wanted to do is add the two amounts and I
| changed
| > | the multiplication sign to addition and it now concatenates the fields
| > | instead of doing Math.
| > |
| > | <input type="text" name="amt" size="9" onblur="this.form.Total.value =
| > | this.form.constant.value + this.amt.value" >
| > | Is there a different addition symbol for this operation?
| > |
| > | Thanks in advance,
| > |
| > | Russell
| > |
| > |
| > |
http://www.eastnorwich.org/joinus.htm is the link.
| > |
| > |
| > |
| > | | > | > Presuming you want the amount entered in the amt field multiplied by
| the
| > | constant field, you need a 3rd hidden field named total
| > | > (set to an arbitrary initial value of 0)
| > | >
| > | > <input type="hidden" name="constant" value="20">
| > | > <input type="text" name="amt" size="9" onblur="this.form.Total.value =
| > | this.form.constant.value * this.value" >
| > | > <input type="hidden" name="Total" value="0">
| > | >
| > | >
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | >
http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | | > | > | Hello Mike,
| > | > |
| > | > | I must admit I got confused .....
| > | > |
| > | > | So here is what I'm trying to do , with my form names. If you would
| be
| > | so
| > | > | kinds as to do the code again using my form fields I would
| appreciate it
| > | > | very much.
| > | > |
| > | > | <input type="hidden" name="constant" value="20.00">
| > | > | <input type="text" name="amt" size="9" >
| > | > |
| > | > | I want to add these two fields and display the result as a field
| > | > | (totalvalue) in the FP confirmation form .
| > | > |
| > | > |
| > | > | Thank You
| > | > |
| > | > | Russell
| > | > |
| > | > |
| > | > |
| > | > | | > | > | > Did you change the names in the script to match the names of your
| > | fields?
| > | > | >
| > | > | > --
| > | > | > Mike -- FrontPage MVP '97-'02
| > | > | > J-Bots 2004 Released Special Pricing
| > | > | >
http://www.websunlimited.com
| > | > | > FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible
| > | > | >
| > | > | | > | > | > >
| > | > | > > I got script errors "object required"
| > | > | > >
| > | > | > >
| > | > | > >
| > | > | > >
| > | > | > >
| > | > | > > | > | > | > >> Ahhh....
| > | > | > >>
| > | > | > >> The old "didn't work" problem.
| > | > | > >>
| > | > | > >> What "didn't work"? Addition errors? Flat tire? Engine light
| on?
| > | Can't
| > | > | > >> attract women? Demons flying out from your monitor?
| > | > | > >>
| > | > | > >> Bob Lehmann
| > | > | > >>
| > | > | > >> | > | > | > >> > Hello again,
| > | > | > >> >
| > | > | > >> > I tried the code you gave me Mike, it didn't work for me.
| > | > | > >> >
| > | > | > >> > Is the Form Calculator add-in at webs unlimited able to add
| two
| > | > | fields
| > | > | > >> > submitted on one page and display it as a field on another
| page
| > | (ala
| > | > | > > FP's
| > | > | > >> > confirmation page)?
| > | > | > >> >
| > | > | > >> > Thanks, Russell
| > | > | > >> >
| > | > | > >> >
| > | > | > >> >
| > | > | > >> > | > | > | > >> > > Thank you Mike, I will try this and also look at the
| product
| > | link.
| > | > | > >> > >
| > | > | > >> > > Russell
| > | > | > >> > >
| > | > | > >> > > | > | > | > >> > > > Hi Russell,
| > | > | > >> > > >
| > | > | > >> > > > Just JavaScript
| > | > | > >> > > >
| > | > | > >> > > > You'll need at least three fields with the two fields
| that
| > | need
| > | > | to
| > | > | > > be
| > | > | > >> > add
| > | > | > >> > > above the last field in the form.
| > | > | > >> > > >
| > | > | > >> > > > The code would be <input type="text" name="Value1"
| > | > | > >> > > onblur="this.form.Total.value = this.form.Value2.value +
| > | > | this.value" >
| > | > | > >> > > > The code for the next field would be <input type="text"
| > | > | > > name="Value2"
| > | > | > >> > > onblur="this.form.Total.value = this.form.Value1.value +
| > | > | > >> > > > this.value" >
| > | > | > >> > > >
| > | > | > >> > > > You may also wish to take a look at
| > | > | > >> > >
| > |
http://www.websunlimited.com/order/Product/FormCalc/formcalc.htm
| > | > | > >> > > >
| > | > | > >> > > > --
| > | > | > >> > > > Mike -- FrontPage MVP '97-'02
| > | > | > >> > > >
http://www.websunlimited.com
| > | > | > >> > > > FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible
| > | > | > >> > > >
| > | > | > >> > > | > | > | > >> > > > > Is there a way to accept 2 numbers as input in form
| fields
| > | and
| > | > | add
| > | > | > >> > them
| > | > | > >> > > > > together and display the result in a confirmation page?
| I
| > | am on
| > | > | a
| > | > | > >> UNIX
| > | > | > >> > > > > server with FPE.
| > | > | > >> > > > >
| > | > | > >> > > > > Thanks, Russell
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > >
| > | > | > >> > > >
| > | > | > >> > >
| > | > | > >> > >
| > | > | > >> >
| > | > | > >> >
| > | > | > >>
| > | > | > >>
| > | > | > >
| > | > | > >
| > | > | >
| > | > | >
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|