Add a hidden field like this? It only displays the first folio.

Seq: 1  Folio: 2201

and then lists all the other pages outside of the <select>

<select name="filelistselect" size="15" multiple class="dirlinks">
<cfloop INDEX="i" FROM="1" TO="#ArrayLen(arPages)#">
<cfset sVal = Trim(ListFirst(arPages[i], ">"))>
<cfset sDisp = Trim(ListLast(arPages[i], ">"))>
<cfset sValNoComma = NumberFormat(sVal, "9999999999")>
<cfset sVal = NumberFormat(sVal)>
<option value="#sValNoComma#">Seq: #sValNoComma#&nbsp;&nbsp;Folio: #sDisp##spacer1#</option>
<input type="hidden" name="filelist">
</cfloop>
</select>

On Wed, 19 May 2004 17:41:35 +0200, Pascal Peters wrote:

>Rename your select "filelistselect",
>create a hidden field named "filelist"
>and call this JS function in the onsubmit of the form:
>
>function makeList(thisform){
> var opts = thisform.filelistselect.options,
>     val="",
>     i=0;
> for(;i<opts.length;i++){
> if(opts[i].selected){
> if(i==0 || !opts[i-1].selected){
> val += ((val.length>0)?",":"") +
>opts[i].value;
> }
> else if(i==opts.length-1 ||
>!opts[i+1].selected){
> val += "-" + opts[i].value;
> }
> }
> }
> thisform.filelist.value = val;
> thisform.filelistselect.disabled = true;
>}
>
><form ... > >
>Pascal
>
>
>>
>>
>> I need to pass it like  1-16,23-25,30,33,40-42,46-48 to the server.
>>
>> >> <select name="filelist" size="15" multiple class="dirlinks">
>> >>
>> >> <cfloop INDEX="i" FROM="1" TO="#ArrayLen(arPages)#">
>> >>
>> >> <cfset sVal = Trim(ListFirst(arPages[i], ">"))>
>> >>
>> >> <cfset sDisp = Trim(ListLast(arPages[i], ">"))>
>> >>
>> >> <cfset sValNoComma = NumberFormat(sVal, "9999999999")>
>> >>
>> >> <cfset sVal = NumberFormat(sVal)>
>> >>
>> >> <option value="#sValNoComma#">Seq:
>> >> #sValNoComma#&nbsp;&nbsp;Folio: #sDisp##spacer1#</option>
>> >>
>> >> </cfloop>
>> >>
>> >> </select>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to