I was wondering if anyone could help or point me in the right direction. I have two text boxes which both call the onChange event. In this they call a function which performs some calculations.
Fixed number 1000
Textbox one: Enter Price
Textbox two: Percentage
If I change textbox one the percentage is updated in textbox two. If I change the percentage in textbox two the price is updated in textbox one.
Because I’m using the onchange event it gets stuck in a nasty loop because I’m changing the value in a textbox which has the onchange event.
Does anyone have any ideas on how I could go about doing this?
Thanks
I'm a little confused by the logic, but my first impression is that you could use a button to call your calculate function, or maybe look at the onblur event.
if you showed some code maybe it would be clearer what you're trying to do...
Again, without seeing the actual code, its hard to fathom out exactly what you're trying to do, but it looks like some sort of caculator..
adding a button to calculate is an option, or even adding a third box, which would display the output of the calculation, but would not need to call a function onchange?
Bookmarks