Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple tex boxes

Status
Not open for further replies.

bobbyr

Programmer
Nov 30, 2000
66
0
0
US
Hopefully someone can help me. I have a page that has a text box at the top which has a check amount (5500.00). Below it are multiple rows with invoice numbers and dollar amounts with a text box beside them. What I'm trying to do is everytime you enter an amount in the text box (25.00), it subtracts that amount from the check amount at the top. If you change the amount, it adjusts it accordingly...

<form action=&quot;get&quot; method=&quot;self.asp&quot; name=&quot;formname&quot;>
Check Amount: <input type=&quot;text&quot; name=&quot;checkamt&quot;>
Payment: <input type=&quot;text&quot; name=&quot;partial1&quot; onChange=&quot;adjust(document.formname.partial1.value)&quot;>
Payment: <input type=&quot;text&quot; name=&quot;partial2&quot; onChange=&quot;adjust(document.formname.partial2.value)&quot;>
Payment: <input type=&quot;text&quot; name=&quot;partial2&quot; onChange=&quot;adjust(document.formname.partial3.value)&quot;>
</form>

I can can adjust the amount the first time, but if I need to make changes to the Payment Amount, it just bombs out..

Any help would be great

Thanks
Bobby R
 
hi
put here what you have for now (i mean script) please, for us (some of us just too lazy :) not to do the hole job for'ya..

& tell us what is your error message, (if there is an error), where does it occurs & so on.. Victor
 
I may be misunderstanding the problem here goes.

Format a textbox using the returned value from a function like:

<input
type=&quot;text&quot;
name=&quot;partial2&quot;
onChange=&quot;this.value = adjust(this.value)&quot;>

This is the least problem prone way I've found.

Hope it helps :) Nice one :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top