|
 |
asp_databases thread: Calculation in Textbox in ASP
Message #1 by "Hiro Shiratori" <hiro-shiratori@m...> on Tue, 16 Jan 2001 10:46:49 -0800
|
|
I'm wondering if anybody can help me on the following issues:
There are some Textboxes in my ASP such as Textbox1, Textbox2, Textbox3...
Each Textbox has numbers in it.
For example, I want to add numbers from Textbox1 to Textbox2 and show
the results on Textbox3.
Would anyone be able to show me how to do this task?
Best regards,
Hiro Shiratori
Message #2 by Gregory_Griffiths@c... on Wed, 17 Jan 2001 08:46:44 +0000
|
|
if you are wanting to do this on the client side try something like :
<script language="javascript">
document.<form name>.textbox3.value = document.<form
name>.textbox1.value + document.<form name>.textbox2.value
</script>
Where <form name> is the name of your form.
> -----Original Message-----
> From: hiro-shiratori@m... [mailto:hiro-shiratori@m...]
> Sent: 16 January 2001 18:47
> To: asp_databases@p...
> Cc: hiro-shiratori@m...
> Subject: [asp_databases] Calculation in Textbox in ASP
>
>
> I'm wondering if anybody can help me on the following issues:
>
> There are some Textboxes in my ASP such as Textbox1,
> Textbox2, Textbox3...
> Each Textbox has numbers in it.
> For example, I want to add numbers from Textbox1 to Textbox2 and show
> the results on Textbox3.
> Would anyone be able to show me how to do this task?
>
> Best regards,
> Hiro Shiratori
>
>
>
>
Message #3 by "Hiro Shiratori" <hiro-shiratori@m...> on Mon, 22 Jan 2001 13:17:24 -0800
|
|
Hello!!
First of all, I'd like to thank you for those who gave some good advice last
week.
I've tried to solve the problem and modified the codes as follows:
<script language="JavaScript">
<!--
thisForm.Textbox7.value="0";
thisForm.Textbox8.value="11";
thisForm.Textbox13.value="22";
function GetValue(form)
{
form.Textbox16.value = [parseFloat(form.Textbox7.value) -
parseFloat(form.Textbox8.value)]/parseFloat(form.Textbox13.value);
}
GetValue(thisForm);
/-->
However, the above code looks into the very 1st record of the Access
database, and shows the same
value on every page.
Does anyone know how the above code can reflect many records on different
pages?
Best regards,
Hiro Shiratori
----- Original Message -----
From: <Gregory_Griffiths@c...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, January 17, 2001 12:46 AM
Subject: [asp_databases] RE: Calculation in Textbox in ASP
> if you are wanting to do this on the client side try something like :
>
> <script language="javascript">
> document.<form name>.textbox3.value = document.<form
> name>.textbox1.value + document.<form name>.textbox2.value
> </script>
>
> Where <form name> is the name of your form.
>
> > -----Original Message-----
> > From: hiro-shiratori@m... [mailto:hiro-shiratori@m...]
> > Sent: 16 January 2001 18:47
> > To: asp_databases@p...
> > Cc: hiro-shiratori@m...
> > Subject: [asp_databases] Calculation in Textbox in ASP
> >
> >
> > I'm wondering if anybody can help me on the following issues:
> >
> > There are some Textboxes in my ASP such as Textbox1,
> > Textbox2, Textbox3...
> > Each Textbox has numbers in it.
> > For example, I want to add numbers from Textbox1 to Textbox2 and show
> > the results on Textbox3.
> > Would anyone be able to show me how to do this task?
> >
> > Best regards,
> > Hiro Shiratori
> >
> >
> >
> >
>
|
|
 |