Results 1 to 3 of 3

Thread: Java Script - onBlur event giving problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    Question

    I have a web page that need validation of input data ..
    and i have used onBlur event that calls ValidateField
    that checks whether the length of entered data in that
    field is greater than certain value(say 3 chars)..

    <INPUT NAME="FirstName" TYPE=TEXT SIZE=15 onBlur="validateField(this,3);" >

    function ValidateField(field,len)
    {
    if (field.length < len)
    {
    alert("Field must be at least " + minLen + "
    characters long!");
    field.focus();
    }
    }

    But, the problem is, the message keeps coming
    infinitely if less characters, say 2 chars is entered..
    It goes into infinite message display and it

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    I've answered this in the javascript forum

    If you want to post to more that one forum please post the question in one forum and then just post a link to it in the other forum(s)
    Mark
    -------------------

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    thanks mark.. sorry i posted at two places..

    hi mark,
    i am sorry, i posted at two places..
    you are perfectly right in that there are
    two successive text boxes, first name, last name
    using these validations..

    Do you know any solution to get around the message
    problem ??
    thanks
    sarath

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