View Full Version : What are these? (Ele.lastEntered, ele.EnteredText )

07-19-2007, 07:23 PM
I am pretty new to javascript and I saw these listed in some code I had run across on th web for uato Completing a list box. I am trying to understand the code, but I have no idea where these had come from.
ele = event.srcElement;
ele.enteredText = ele.enteredText.substring(0,ele.enteredText.length-1);
var t = curTime.getTime() - ele.lastEntered;

I wanted to know if there is a list of these items somewhere.

I can not find them in any list of properties, methods or events?

Please help?

07-19-2007, 07:49 PM
That's probably custom attributes. You can create custom attributes in an element and access them.

<input type="text" name="txt" lastEntered="" enteredText="" onblur="this.lastEntered=this.enteredText; this.enteredText=this.value;" />
<input type="button" value="Show Text" onclick="alert('entered:' + this.form.txt.enteredText + '\nlast entered:' + this.form.txt.lastEntered)" />