Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What are these? (Ele.lastEntered, ele.EnteredText )

    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?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    That's probably custom attributes. You can create custom attributes in an element and access them.
    Code:
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •