Problem with zero length values...

Results 1 to 2 of 2

Thread: Problem with zero length values...

  1. #1
    Join Date
    Dec 1969

    Default Problem with zero length values...

    Ok,<BR><BR>Someone kindly gave me this function (changed a little)<BR><BR>I am feeding it data from a form. However one of the main purposes of this error checking is to check for empty fields.<BR><BR>This is a problem due to the fact that it won&#039;t accept zero length values... :o(<BR><BR>Function LoadValue(FormValue) <BR>IF Len(Trim(FormValue)) &#062; 0 THEN<BR>LoadValue = Trim(FormValue) <BR>ELSE<BR>ErrorCount = ErrorCount + 1 <BR>END IF<BR>End Function <BR><BR><BR>Anyone got any ideas?<BR><BR>I am feeding it data like:<BR><BR>variablename=LoadValue(Request.Form(" formelementname"))

  2. #2
    Join Date
    Dec 1969

    Default Use empty quotes

    function loadvalue(formvalue)<BR>if trim(formvalue) &#060;&#062; "" then<BR> loadvalue = trim(formvalue)<BR>else<BR>errorcount = errorcount + 1<BR>end if<BR>end function

Posting Permissions

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