I would just use a periodical check (every 100ms for example). That's
the easiest and most error proof way. There are two more ways I can
think of how an input field could be changed and at least the second
doesn't fire an event: When auto completion fills in the field or a
script, f.e. a Greasemonkey script changes it.
On Oct 26, 2008, at 18:25, Mr. Skippy wrote:
I created a custom Event for a textfield that will fire when the
maxlenght is reached.
------
Element.Events.full = {
base: 'keyup', // something is typed in the element
condition: function(event){
if ($defined(this.getProperty('maxlength')) {
// if the value.length matches the maxlength the event
will fire
return (this.getProperty('value').length ==
this.getProperty('maxlength') );
}
return false;
}
};
------
But at the moment the event will only fire when the user uses the
keyword, is there a way that when the user uses the mouse to fill the
textfield it will also fire (mouseup)?
--
my blog: http://blog.kassens.net