...

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



ckwizard77
07-19-2007, 06: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.
Code:
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?

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

<form>
<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)" />
</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum