Validate textfield

Results 1 to 2 of 2

Thread: Validate textfield

  1. #1
    Join Date
    Dec 1969

    Default Validate textfield

    Hello,<BR><BR>I want to validate some text boxes, how do I need to do this. When a box is not filled in, there has to come a message that this field wasn&#039;t filled in.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Validate textfield

    function validate(theform)<BR> {<BR> var flag = true;<BR><BR> if(theform.textbox.value.length == 0)<BR> {<BR> alert(&#039;What are you stupid or something? Fill in the box&#039;);<BR> flag = false;<BR> }<BR><BR>return flag <BR><BR>OR <BR>if(flag)<BR> theform.submit();<BR>}

Posting Permissions

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