adding two form fields and displaying the result

R

Russell

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
 
M

MD Websunlimited

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
 
R

Russell

Thank you Mike, I will try this and also look at the product link.

Russell

MD Websunlimited said:
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 +
 
R

Russell

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
 
B

Bob Lehmann

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
 
R

Russell

I got script errors "object required"





Bob Lehmann said:
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
 
M

MD Websunlimited

In directly it could by setting the value of the field that is displayed on the confirmation page.
 
R

Russell

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
 
S

Stefan B Rusynko

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">






| 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
| > >> > > > >
| > >> > > > >
| > >> > > > >
| > >> > > > >
| > >> > > >
| > >> > > >
| > >> > >
| > >> > >
| > >> >
| > >> >
| > >>
| > >>
| > >
| > >
| >
| >
|
|
 
R

Russell

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.



Stefan B Rusynko said:
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" >
 
S

Stefan B Rusynko

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



| 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
| > | > >> > > > >
| > | > >> > > > >
| > | > >> > > > >
| > | > >> > > > >
| > | > >> > > >
| > | > >> > > >
| > | > >> > >
| > | > >> > >
| > | > >> >
| > | > >> >
| > | > >>
| > | > >>
| > | > >
| > | > >
| > | >
| > | >
| > |
| > |
| >
| >
|
|
 
R

Russell

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







Stefan B Rusynko said:
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



| 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
| > | > >> > > > >
| > | > >> > > > >
| > | > >> > > > >
| > | > >> > > > >
| > | > >> > > >
| > | > >> > > >
| > | > >> > >
| > | > >> > >
| > | > >> >
| > | > >> >
| > | > >>
| > | > >>
| > | > >
| > | > >
| > | >
| > | >
| > |
| > |
| >
| >
|
|
 
S

Stefan B Rusynko

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
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > >
| > | > | > >> > > >
| > | > | > >> > >
| > | > | > >> > >
| > | > | > >> >
| > | > | > >> >
| > | > | > >>
| > | > | > >>
| > | > | > >
| > | > | > >
| > | > | >
| > | > | >
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|
 
R

Russell

TY Stefan,

I did the last suggestion..no luck. I have added the Total field to the
confirmation page and of course to the saved fields in the form.

The code you have given me worked for multiplication, the field (correct
answers) displayed on my confirmation page. When I changed from
multiplication to addition it concatenated and displayed the result . When I
use the latest <onblur="this.form.Total.value =
parseInt(this.form.constant.value) + parseInt(this.amt.value)" > I get zero
as a result.

Any clue where to go next?

Thanks

Russell



Stefan B Rusynko said:
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
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > >
| > | > | > >> > > >
| > | > | > >> > >
| > | > | > >> > >
| > | > | > >> >
| > | > | > >> >
| > | > | > >>
| > | > | > >>
| > | > | > >
| > | > | > >
| > | > | >
| > | > | >
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|
 
R

Russell

WOO HOO !!

LOL

It works . I/we left the .form out of the last part of this expression
onblur="this.form.Total.value = parseInt(this.form.constant.value)
+parseInt(this.amt.value)" >

should read (this.form.amt.value).


TY for your time Stefan,

Regards, Russell







Russell said:
TY Stefan,

I did the last suggestion..no luck. I have added the Total field to the
confirmation page and of course to the saved fields in the form.

The code you have given me worked for multiplication, the field (correct
answers) displayed on my confirmation page. When I changed from
multiplication to addition it concatenated and displayed the result . When I
use the latest <onblur="this.form.Total.value =
parseInt(this.form.constant.value) + parseInt(this.amt.value)" > I get zero
as a result.

Any clue where to go next?

Thanks

Russell



Stefan B Rusynko said:
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
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > > >
| > | > | > >> > > >
| > | > | > >> > > >
| > | > | > >> > >
| > | > | > >> > >
| > | > | > >> >
| > | > | > >> >
| > | > | > >>
| > | > | > >>
| > | > | > >
| > | > | > >
| > | > | >
| > | > | >
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|
 
Top