Need to compare part of a textbox value with an ar

Results 1 to 2 of 2

Thread: Need to compare part of a textbox value with an ar

  1. #1
    Join Date
    Dec 1969

    Default Need to compare part of a textbox value with an ar

    Hi,<BR> I have two text boxes in Step 1 which are named "tel" & "tel2"<BR> In Step 2,I am able to compare value of "tel1" to an array and check it.<BR>The same code doesn&#039;t work for "part1" of "tel2" in the code below.<BR>&#060;% <BR>Dim values<BR>Dim i<BR><BR>values = array("704","828","919","336","252","980","910","2 70","502","606","859")<BR>Dim bValueInArray<BR>tel1 = Request.Form("tel1")<BR>bValueInArray = False<BR>For i = 0 to 10<BR>bValueInArray = bValueInArray OR (tel1 = values(i))<BR>Next<BR><BR>If Not bValueInArray Then<BR>Server.Transfer("SignUp_Step2a_new.asp")<B R>End If<BR>%&#062;<BR>&#060;% dim nxxval<BR>dim j<BR>nxxval = array("200","201","202","203","205")<BR><BR>Dim tValue<BR>tel2= request.form("tel2")<BR> part1 = left(tel2,3)<BR><BR>tValue = false<BR>For j = 0 to 4<BR>tValue = tValue OR (part1 = nxxval(j))<BR>Next<BR><BR>If Not tValue Then<BR>Server.Transfer("SignUp_Step2a_new.asp")<B R>End If<BR>%&#062;<BR>Please let me know if there are any changes to be made.<BR>Thanks,<BR>Prasanna<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default hmmm

    the only thing i can think of is you MAY want to use cstr when you are comparing the 2 values<BR><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