Forums

This topic is locked

Calculating average of a form value ?!

Posted 19 Jul 2001 10:29:13
1
has voted
19 Jul 2001 10:29:13 Adam Cronin posted:
Hi,

Im trying to work out how to go about calculating an average based upon two form values. The user inputs, one value, then the other, hits the "submit" button and the average is displayed underneath.
Im pretty sure Ultradev cant do this, but I dont mind getting stuck into some hand-coding instead.
If anyones got any ideas/suggestions/links i'd be very grateful.

Thanks.

Replies

Replied 19 Jul 2001 11:15:56
19 Jul 2001 11:15:56 Viktor Farcic replied:
When you click submit you should send form values (value1, value1) to the same page. If you're using post method you can put something like:
<%= (Request.Post("value1" + Request.Post("value2")/2 %>


<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi,

Im trying to work out how to go about calculating an average based upon two form values. The user inputs, one value, then the other, hits the "submit" button and the average is displayed underneath.
Im pretty sure Ultradev cant do this, but I dont mind getting stuck into some hand-coding instead.
If anyones got any ideas/suggestions/links i'd be very grateful.

Thanks.


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Reply to this topic