Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i am pretty new to asp and web scripting in general.

i am creating a form with a number of text boxes. in two of the boxes i input values - total amount and amount spent. i want to calculate the percentage spent in a third text box.

my challenge is that i want the result to be displayed immediately i enter both values, without submitting the form. the issue is i have to submit the form to a validation web page before sending it to the server, and i am aware that a form can only be posted to only one webpage.

can i achieve this with asp (not asp.net)?
Posted

you don't need asp for that you can simply use html and javascript. More detail on "immediately" is required??
 
Share this answer
 
oh really? this is what i mean by 'immediately'. i type in a value for total amount, then i input a value for amount spent, then the percentage spent is computed the moment i exit the 'amount spent' box.

I know something about onChange in javascript but i do not know how to write the code.

Please help me out.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900