Discussion Locked
0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a form that has a scrolling text box with 20 names. I only want the user to be able to select 5 names. I am trying to write code that will pop up a dialog box that says "you can only select 5 names". I am also trying to run this when the client selects the Submit button.
7 replies
by e.rick
If you define a dropdown with your twenty names and set it to allow multiple selections you can determine the number of selected items with the Count property.
For example, if I have a SELECT field defined on my page called NameList, I can find out how many items are currently selected with the following statement:
Request.Form("NameList").Count
by dmmoe
The question was auto-closed by TechRepublic
by al macintyre
I program in other languages, but I would either have the names in an array or subfile so that I could either count non-blanks or loop check for non-blank & exit at 6, then return text box to user with what they selected with your error message.
by dmmoe
The question was auto-closed by TechRepublic
by dmmoe
This question was auto closed due to inactivity
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
0 helpful
5 replies
1 helpful
3 replies
0 helpful
1 reply
0 helpful
1 reply
Question Unanswered
PDF vs HTML
0 helpful
0 replies