Checking form elements

Results 1 to 2 of 2

Thread: Checking form elements

  1. #1
    Join Date
    Dec 1969

    Default Checking form elements

    I&#039;m running a simple script to check for blank form elements: <BR> <BR>For n = 1 to Request.Form.Count<BR> if Request.Form.Item(n) = empty then<BR> Response.Write "error"<BR> Response.End<BR> end if<BR>Next<BR> <BR>But elements in a blank select box: <BR><BR>&#060;select&#062;<BR>&#060;option&#062;&# 060;/option&#062;<BR>&#060;/select&#062;<BR><BR>do not trigger the "error" contitional.<BR>If I specify the form select element in the "if" statement:<BR>Request.Form("selectbox1") = empty<BR>it works fine. But if I have a huge form I dont want to speciy each element giving me a problem.<BR><BR>Is there a better way to do what I want to do.

  2. #2
    Join Date
    Dec 1969

    Default What if

    You named each select box with a SEL prefix, and when your loop encounters that SEL prefix, iterate to the next counter value?

Posting Permissions

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