Split function

Results 1 to 2 of 2

Thread: Split function

  1. #1
    Join Date
    Dec 1969

    Default Split function

    Hi there,<BR><BR>I have an online quiz and am using check boxes instead of radio buttons for some of the answers so I could have multiple answers. My other questions use radio buttons for the answer and I am using this code in the post:<BR><BR> For Question = 1 To Max<BR> Answer = Request(Cstr(Question) & "a")<BR> Check = Right(Answer, Len(Answer) -1)<BR> Answer = Left(Answer,1)<BR><BR>So it would find the correct answer as:<BR><BR>&#060;input type="hidden" name="2a" value="AClean Desk"&#062;<BR>ultimately "Clean desk"<BR><BR>But if I use checkboxes, I need it to be like this:<BR><BR>&#060;input type="hidden" name="2a" value="AClean Desk,BOrderly Workarea,CTelephone Directory"&#062;<BR><BR>I would like the correct answer to be "Clean Desk, Orderly Workarea, Telephone Directory". I&#039;ve used the split function but it&#039;s almost like a double split and I can&#039;t quite get the syntax correct. Any ideas would be quite helpful. THanks.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Split function

    Let me get it straight. <BR>If some of the questions have checkboxes that means they can have multiple values. And you want them to be sorted in a 2a=AClean Desk,BOrderly Workarea,CTelephone Directory type format? Then all you have to do is name all the checkboxes within a group with the same name and they should get stored in the format you want.

Posting Permissions

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