Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding 2 values from a form

Status
Not open for further replies.

Lucas68

Programmer
May 9, 2001
14
BR
Hi,

I want to show the addition of these 2 "ints":intTotal and intSomething from a form and show the result on a confirmation page.
The form:
/first value to add
<input type=&quot;hidden&quot; name=&quot;intTotal&quot; value=&quot;<%= formatNumber((intTotal * 1.00), 2) %>&quot;>
/second value to add
<select name=&quot;intSomething&quot;>
<option value=&quot;7,00&quot;>A</option>
<option value=&quot;28,25&quot;>B</option>
<option value=&quot;21,70&quot;>C</option>
</select>

Can I use something like this in the form:
<input type=&quot;hidden&quot; name=&quot;intAnother&quot; value=&quot;<%= formatNumber((intTotal + intSomething), 2) %>&quot;>
And call it on the confirmation page with something like this:
<%
Dim sAnother
sAnother = Request.Form (&quot;intAnother&quot;)
Response.Write sAnother
%>

I tried that but only intTotal shows, no addition...

This is the only thing missing, I just can't add the 2 values!!!
Thanx in advance,
Lucas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top