||Re: LOGICAL ERROR
Akshat Kapoor <firstname.lastname@example.org>
||Sun, 11 Mar 2018 22:31:24 +0530
On 11/03/2018 19:22, Mustansir Ghor wrote:
> I seem to get confused many times use of 'this' object. When following PBRCANCEL_onclick() is executed, there is change in value of form.eamount. Therefore function Eamount-Onchange() will execute. On its execution what will 'this' refer to ?
> Best Regards
> function PBRCANCEL_onClick()
> function EAMOUNT_onChange()
> if this.value>0
You are changing the value of form.eamount programmatically. I am not
commenting if eamount_onchange will fire or not. But to be on the safe
side I would prefer using form.eamount.value to be sure of which value I
am refering to rather than this.value which usually refers to the value
of object in focus.
This may be due to my lack in experience in oops/flow of control but I
prefer not to use this. / parent notation if avoidable.