[jQuery] Re: 'this' keyword in a custom object

2009-09-22 Thread RobG
On Sep 22, 9:04 pm, RobG wrote: [...] > e.g. something like > >  function addOne() { >     numChanged++; >  } >  var numChanged = 0; >  var inputs = document.getElementsByTagName('input'); >  var i = inputs.length; >  while (i--) { >   inputs[i].onchange = numChanged; Ooops: inputs[i].onc

[jQuery] Re: 'this' keyword in a custom object

2009-09-22 Thread RobG
On Sep 22, 8:17 pm, Alex Wibowo wrote: > Hi... > > I'm trying to write object-oriented style javascript as follows: > > - > function HtmlFormUtil(formId){ >     this.formId=formId; >     this.dirtyInputs=new Array();} > > HtmlFormUtil.prototype.trackForChanges=functi