A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Determining if an input text field is empty

  1. #1
    Junior Member
    Join Date
    May 2001
    Posts
    15

    Post

    Simple question ...

    I'd like to verify if a text input is empty. In the following example, I tried with the string length: it doesn't seem to work. (field variable is Input and len has already been declared).

    on (release) {
    len = Input.length;
    trace(long);
    if (len == 0) {
    // error about field being empty
    }
    else {
    // do whatever with text field
    }
    }

    Would anybody know how to achieve this?

    Thanks !

  2. #2
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    Hi...

    Try:

    if (len eq "") {
    //do whatever

    HTH,

    K>

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center