Advertisement

10.02.2008 at 04:13AM PDT, ID: 23781131 | Points: 250
[x]
Attachment Details

onchange not executing because field is not being tabbed off to trigger onchange

Asked by jescot in JavaScript, Scripting Languages

Tags:

Hi ppl,
I've got a script that works perfectly and it does what it is supposed to do.
I have a Qty total box which is set to read only and totals all the single qty fields.
When you change one of the single qty fields the text total field updates correctly (simple sum)
But I have another event that triggers on change of the QtyTotal which changes a textarea's background color.
Now the problem is that the fields total correctly and the QtyTotal field updates but the text area background color does not change because the onchange function is not firing.  

Upon investigation I've found out that by
 * removing read only
 * and keying the amount directly into the total qty text box
 * then tabbing off
the onchange works and executes the code worked perfectly
but will not work if the amount in that field changes because of a calculation change.
So how do I get the code to trigger when the text box field changes?Start Free Trial
[+][-]10.02.2008 at 04:50AM PDT, ID: 22623181

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628