VERY basic question

Results 1 to 4 of 4

Thread: VERY basic question

  1. #1
    Ronnie Brown Guest

    Default VERY basic question

    How do I make sure that an empty text box isn&#039t allowed when a user clicks on the submit button on a form?<BR><BR>Thanks for any help.

  2. #2
    Steve Cimino Guest

    Default RE: VERY basic question

    OnClick function:<BR><BR>if (document.formname.textboxname == &#039&#039)<BR>{<BR>alert("fill in the box");<BR>}<BR>else<BR>{<BR>document.formname.subm it();<BR>}

  3. #3
    KPW Guest

    Default RE: VERY basic question

    Just one correction:<BR><BR>if (document.formname.textboxname.value == &#039&#039)<BR><BR>You HAVE to have the "value" property -- at least I always have to have it.<BR><BR>HTH

  4. #4
    Join Date
    Dec 1969

    Default RE: VERY basic question

    You&#039re right... I was hurried when I wrote this. You absolutely will need to have value in there.

Posting Permissions

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