473,463 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Calculate Form

Hi all,

need to do a simple form calculation in asp based on values in 2 other field
and enter that data into table.

(field)SubTotal + (field)VAT = (Result in field)GrandTotal

Any resources available

Thanks
--
Simon Gare
The Gare Group Limited

website: www.thegaregroup.co.uk
website: www.privatehiresolutions.co.uk
Nov 10 '06 #1
4 3154
Simon Gare wrote on 10 nov 2006 in
microsoft.public.inetserver.asp.general:
need to do a simple form calculation in asp based on values in 2 other
field and enter that data into table.

(field)SubTotal + (field)VAT = (Result in field)GrandTotal
========== test.asp ===========

<form method='post'>
<input name='subtotal'
value='<%= request.form("subtotal") %>'>
subtotal<br>
<input name='vat'
value='<%= request.form("subtotal") %>'>
vat in %<br>
<input type='submit' value='calculate'>
</form>

<table><tr>
<td>
GrandTotal:
<td>
<%= request.form("subtotal")*(1+request.form("vat")/100) %>
</table>

===============================
Any resources available
OK, please send € 1000.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 10 '06 #2
Evertjan. wrote on 10 nov 2006 in
microsoft.public.inetserver.asp.general:
Simon Gare wrote on 10 nov 2006 in
microsoft.public.inetserver.asp.general:
>need to do a simple form calculation in asp based on values in 2 other
field and enter that data into table.

(field)SubTotal + (field)VAT = (Result in field)GrandTotal

========== test.asp ===========

<form method='post'>
<input name='subtotal'
value='<%= request.form("subtotal") %>'>
subtotal<br>
<input name='vat'
value='<%= request.form("subtotal") %>'>
The above line should be:

value='<%= request.form("vat") %>'>
vat in %<br>
<input type='submit' value='calculate'>
</form>

<table><tr>
<td>
GrandTotal:
<td>
<%= request.form("subtotal")*(1+request.form("vat")/100) %>
</table>

===============================
>Any resources available

OK, please send € 1000.
€ 995.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 10 '06 #3
Thanks for that, like everything you never look for the easy route and have
been going round the houses for days!!

Thanks again.

Simon

PS No more than 750

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Evertjan. wrote on 10 nov 2006 in
microsoft.public.inetserver.asp.general:
Simon Gare wrote on 10 nov 2006 in
microsoft.public.inetserver.asp.general:
need to do a simple form calculation in asp based on values in 2 other
field and enter that data into table.

(field)SubTotal + (field)VAT = (Result in field)GrandTotal
========== test.asp ===========

<form method='post'>
<input name='subtotal'
value='<%= request.form("subtotal") %>'>
subtotal<br>
<input name='vat'
value='<%= request.form("subtotal") %>'>

The above line should be:

value='<%= request.form("vat") %>'>
vat in %<br>
<input type='submit' value='calculate'>
</form>

<table><tr>
<td>
GrandTotal:
<td>
<%= request.form("subtotal")*(1+request.form("vat")/100) %>
</table>

===============================
Any resources available
OK, please send ? 1000.

? 995.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Nov 11 '06 #4
Simon Gare wrote on 11 nov 2006 in
microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>Evertjan. wrote on 10 nov 2006 in
microsoft.public.inetserver.asp.general:
Simon Gare wrote on 10 nov 2006 in
microsoft.public.inetserver.asp.general:

need to do a simple form calculation in asp based on values in 2
other field and enter that data into table.

(field)SubTotal + (field)VAT = (Result in field)GrandTotal

========== test.asp ===========

<form method='post'>
<input name='subtotal'
value='<%= request.form("subtotal") %>'>
subtotal<br>
<input name='vat'
value='<%= request.form("subtotal") %>'>

The above line should be:

value='<%= request.form("vat") %>'>
vat in %<br>
<input type='submit' value='calculate'>
</form>

<table><tr>
<td>
GrandTotal:
<td>
<%= request.form("subtotal")*(1+request.form("vat")/100) %>
</table>

===============================

Any resources available

OK, please send ? 1000.

? 995.
Thanks for that, like everything you never look for the easy route and
have been going round the houses for days!!
In real live you should test serverside if the submitted value strings
can be converted to numbers or a nice error message should be generated.
PS No more than 750
751

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Building Blocks | last post by:
Hi, All I need is a simle calculate form script which contains this: A script that can handle text input, radio buttons, checkboxes, and dropdowns. Each one of these variables will contain a...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
6
by: jochen scheire | last post by:
Is there a way I can calculate a field in a form based on another field in the same form. When clicking submit, both values should be posted to the next page. I want to be able to type in a value...
4
by: Jan Szymczuk | last post by:
I'm creating an MS Access 2000 database where I have a number of people entered using simple basic fields, Surname: SMITH Forenames: John DoB: 09/09/1958 Age:...
1
by: Drew Leon | last post by:
I have a Tab Control on a form. Each one of the tabs have two populated List Boxes on them. I have a Button on the form which I would like to use to calculate the various math problems in the Tabs....
4
by: Rich_C | last post by:
I'm sure this is very simple, but I have very little experience with javascript -- and what I do know isn't helping me here. I have a simple form where users can enter a quantity (qty) and cost...
6
by: luanhoxung | last post by:
dear all!! i met the headache problem in setting value for some controls in my form. i have 2 combo box in form F1. i want to set value for some textbox in F1 when i choose value from 2 combo...
2
by: reidarT | last post by:
I have 3 fields in an aspx page. The 3. field should be the sum of field A and field B I use OnTextChanged to calculate the sum in field3. At the same time I want to insert the content of theese 3...
5
chunk1978
by: chunk1978 | last post by:
hey... can anyone show me how to calculate sums to the 2nd decimal only? like: 5.50 + 4.00 = 9.50 i seriously have zero idea and could defo use some help...thanks! <script...
5
by: brendanmcdonagh | last post by:
Hi, I have been learning VB now for about a week and thought I was doing ok. I have already done a calculation form (not as big as this) . I have volunteered myself to help a friend input her hours...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.