Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile all selections to a string

Status
Not open for further replies.

Nebooaw

Programmer
Jun 1, 2001
142
GB
Hi, how can i make a selection from a form field (or multiple selections) create a string of all the values seperated with an "or", then display it?

Kindest regards.
 
are you talking about a select element with a property of multiple? When do you want to "display" this list, and how would you like to display it? In another field, or just text?

*cLFlaVA
----------------------------
[tt]clean slate...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Hi, i want to be able to display the text on the screen / alert also write the entire string to an asp session variable.

hope this helps. how would it work with multiple selections from several different selection boxes?

regards.
 
Ideally this functionality would be handled on the ASP end, not the JavaScript end. JavaScript is disabled in arguably 10% of all browsers. ASP is disabled in 0% of them. You'll lose 10% of your data in a public website.

ASP will allow you to loop through the select value array and build the string if need be.

*cLFlaVA
----------------------------
[tt]clean slate...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Hmmm, do you have an example in asp? I could look at? Would prefer to use asp as the rest of the project is all asp.

kindest thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top