|
OnClick to return values on same page?
Hi guys,
I am brand new here and very junior in javascript.
I hope you will be able to help me.
I have been trying to produce a very basic calculator where the user enters certain numeric values in textfields, then I use javascript to carry out the calculations. I have had no problems constructing the calculation function in javascript, but when I call the function by clicking a button, the whole page reloads and I get the answer in a blank new page. What I can't figure out how to do is to display the result of the calculations at the bottom of the current page (where I collect the data from the users), keeping the textfields as they are just adding the whatever the function returns at the bottom of teh page.
I hope you can give me direction on this.
Thanks a lot,
Peter
Last edited by Aso; July 28th, 2008 at 04:15 PM..
Reason: Moved to JavaScript Forum
|