Recognizing Commas not comma-delimited lists

Results 1 to 2 of 2

Thread: Recognizing Commas not comma-delimited lists

  1. #1
    Join Date
    Dec 1969

    Default Recognizing Commas not comma-delimited lists

    My form is accepting several largetext fields which share the same parameter name, creating a comma-delimited list with the values. However the teextfields will most likley contain commas somewhere in the body of the user input. Everytime a comma is found, the loop i wrote thinks that anything after the comma is a new data instance. Is there a way to make it understand that commas within textboxes should be recgonized as part of the text?

  2. #2
    Join Date
    Dec 1969

    Default probably not a good idea

    You&#039;d have been much better off adding a counter value to a similarly named textarea element instead of using a control array.<BR><BR> &#060;textarea name=txtComments_1&#062;&#060;/textarea&#062;<BR>&#060;textarea name=txtComments_2&#062;&#060;/textarea&#062;<BR>&#060;textarea name=txtComments_3&#062;&#060;/textarea&#062;<BR><BR> Then, just strip the txtComments out of the Request object<BR> name and leave yourself the counter or id value.<BR><BR> Untested code...<BR><BR> for each oCtrl in Request.Form<BR> if InStr(Request(oCtrl),"txtComments") &#062; 0 then<BR> sElementID = Replace(oCtrl,"txtComments","")<BR> end if<BR> next

Posting Permissions

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