Advanced Split function

Results 1 to 3 of 3

Thread: Advanced Split function

  1. #1
    Join Date
    Dec 1969

    Default Advanced Split function

    Hello, I am trying to build an address book component, where a pop up window lists the users with a checkbox next to each one. Each checkbox value corresponds to the appropriate username and user value, such as: 2/Paul Taylor, 3/Joe Smith, etc. I am using the "/" character to seperate the userID from the username. When it submits the form to the receiving page, I am trying to split the string into an array based on the "/" character, but also on the comma that is automatically inserted after each record pair, so I can build a select list with the &#060;option value="userID"&#062;user name&#060;/option&#062;<BR><BR>I don&#039;t know how to split the string based on the two delimiters, the "/" and the ","<BR><BR>Any help would be greatly appreciated!<BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: Advanced Split function

    //<BR><BR>Shows how to deal with checkboxes and other inputs that pass an array of elements.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default FOR NEXT and another SPLIT

    &#060;%<BR>pairs = Split( Request("YourCheckboxesName"), ", " ) &#039; COMMA-SPACE!<BR>For p = 0 To UBound(pairs)<BR> pair = Split( pairs(p), "/" )<BR> num = pair(0)<BR> name = pair(1)<BR> Response.Write "Found number " & num & " for " & name & "&#060;br/&#062;"<BR>Next<BR>%&#062;<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