Results 1 to 2 of 2

Thread: Text box function (to see if they wrote something)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    I need to make sure the person
    filling out the form on my website
    actually wrote there info down.

    So .. I need to function to check
    all the text boxes.. and then when
    down .. if a text box is empty goto
    filledwrong.htm, if all full goto
    the sendemail CGI

    thanks!

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Smile

    Hi Evan,

    Lets say that there are two text boxes that need filling in, and a submit button to continue:

    ------------------------------------------------------
    <SCRIPT LANGUAGE="JAVASCRIPT"><!--

    function Submit() {

    If (textbox1.value == "" OR textbox2.value == "") {
    //Enter code to goto webpage or
    //Have a messagebox popup like so:
    Alert("Warning, All fealds must be filled in!")
    }
    else {
    //Add code to goto page
    }
    }

    --></SCRIPT>
    ------------------------------------------------------
    [hr]

    Hope it helps.

    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

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