Need Array?

Results 1 to 2 of 2

Thread: Need Array?

  1. #1
    Join Date
    Dec 1969

    Default Need Array?

    Where to begin with this ? I can find examples of the first parts, but not the checkbox part, populating the fields before the final submit and getting it to email me.<BR><BR>I have ASPmail from Server Objects which I use for other things on a IIS 5 server.<BR><BR>Dropdown listbox (Cheese.asp)<BR> Swiss<BR> Cheddar<BR> Brie(Selected)<BR><BR>Submit--------------&#062;(CheeseResults.asp)<BR>Cheap Brie $3.00<BR>Decent Brie $5.00<BR>Fabulous Brie $9.99<BR><BR>What I&#039;d like to do is have this form to have a checkbox next to the 3 Brie choices<BR><BR>(Cheese Results.asp)<BR> Cheap Brie $3.00<BR>X Decent Brie $5.00<BR>X Fabulous Brie $9.99<BR><BR>Filter out only the ones unchecked<BR><BR>Submit--------------&#062;(CheeseEdit.asp)<BR>Decent Brie $3.00 XYZ Cheese <BR>Fabulous Brie $9.99 ABC Cheese Haus<BR><BR>Be able to populate the 6 fields above with the database data and edit them as needed<BR><BR>Submit---------&#062; & write to database (or just one of these choices)<BR><BR>I was able to do most of this with Frontpage and Access but when submitting, I&#039;d get all the changed field data separated by commas. I am looking for a real solution.

  2. #2
    Join Date
    Dec 1969

    Default RE: Need Array?

    Use the Split() function. It will parse the contents into an array. You then just play with your array to get the data out. <BR><BR>Here&#039;s a link showing the use of the Split() function:<BR><BR><BR>Since everything is separated by commas, just use that as a delimeter.<BR><BR>Therefore, the string to splice is the checkbox one, named here chesse:<BR><BR>&#060;% myarray = Split(Request.Form("cheese"), ",") %&#062; <BR>&#060;%=myarray(0) %&#062; <BR>&#060;%=myarray(1) %&#062; <BR>&#060;%=myarray(2) %&#062; <BR><BR>Have fun, <BR><BR>Vadim C.<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