value from a field

1. Junior Member
Join Date
Dec 1969
Posts
9

value from a field

HI All:<BR><BR>I am trying calculate the calculate the percentage of a field value. Actually i have so many fields from which i calculated the total save it in the database and display it on the same page. and i have a field called TTotal and i have given a onclick event on tjis field which is when i click the text field of TTotal it will display the value of total into this TTotal Fields. From here i want to use a image next to TTotal field and when i click it a pop up window should come and the value which is displaying the TTotal and a dropdown window of percent&#039;s and determine the percent of that TTotal field and the calculated should be displayed at the same place and there i have one more button to complete the process of the page.Please advice me how to do this one or code. The page is done in ASP. <BR><BR>Thank you in advance

2. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

Wow

that went on and on<BR><BR>a second reading did not help<BR><BR>Can you explain again, this time with an example<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
19,082

I agree

sounds to me like :<BR><BR>"I&#039;ve got a page with some form fields in it. I&#039;m looking for some javascript to do calculations on the values of the fields and show me the result in a popup or alert box"

4. Senior Member
Join Date
Dec 1969
Posts
5,955

Maybe zaii could explain what exactly...

...she/he is having a problem with. Calculating percentages is basic maths. Opening a pop up is basic JavaScript. Populating form fields is also fairly basic JavaScript.<BR><BR>Oliver.

5. Junior Member
Join Date
Dec 1969
Posts
9

RE: Maybe zaii could explain what exactly...

HI All:<BR><BR>There are 3 different forms are there in my page. form1 caluculates the total of that particular item purchased and shows the total right way in the page, i used the dropdown list to select the item to purchased.then i got a field in the form2 which is called Tip field. When i click on the tip field the total in the form1 will display in tip field using onclick event. then i want to calculate the the value in the tip field to percentage and display on the same field without leaving the same page. Hope you understand.<BR><BR>Thanks

6. Senior Member
Join Date
Dec 1969
Posts
5,955

So you don't know how to calculate...

...a percentage? Am I right? If so, here&#039;s an example:<BR><BR>Value 1 = 123<BR>Value 2 = 234<BR>Value 3 = 456<BR>Total = 813<BR><BR>Value 4 = 111<BR><BR>Percentage for Value 4 of Total = 111 / 813 * 100 = 13.653<BR><BR>Oliver.

7. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

I think it is more of a

"can you code it for me please"<BR><BR><BR>

8. Junior Member
Join Date
Dec 1969
Posts
9

RE: I think it is more of a

Hi All<BR><BR>Thanks for the input.I sovled it.<BR><BR>

9. Senior Member
Join Date
Dec 1969
Posts
5,955

It would nice if you posted the solution...

...so that other people, who have the same problem (whatever it was in the first place), can find it.<BR><BR>Oliver.

10. Join Date
Dec 1969
Posts
1,969