Thanks Pascal,

It works beautifully!

--Original Message Text---
From: Nathan R. Jessop
Date: Wed, 19 May 2004 14:00:41 -0400

Hi Pascal,

I'm afraid I've made it more difficult than it has to be. I'm trying to modify existing code and my experience is limited when it becomes this complicated.

I sent an email back to CFtalk. Rather than mess with the <select> option I guess I should have said is it easier to manipulate the variable I'm sending to my action page that
contains the list of selections.

Ignore the <select> stuff.

Let's say I have a variable being passed to my action page that contains the following (this can vary):

var1 = "1,2,3,4,5,6,10,11,12,13,14,20,25,30,31,32,33,50"

How can I arrange the above variable into a range. Meaning...how can I take any input from the variable and basically create a new varaible with the following:

var2 = "1-14,20,25,30-33,50"

Notice that if the numbers run consequtively they are "grouped" starting with first then last separated by a hyphen.

Is this possible? I know what I want to do but its how to implement it.


--Original Message Text---
From: Pascal Peters
Date: Wed, 19 May 2004 19:48:22 +0200

Her are the files I used for testing. Works like a charm.

Pascal Peters
Certified ColdFusion MX Advanced Developer
Macromedia Certified Instructor
LR Technologies
Av. E. De Mot, 19
1000 BRUSSELS, BELGIUM
Tel: +32 2 639 68 70
Fax: +32 2 639 68 99
Email: [EMAIL PROTECTED]
Web: www.lrt.be


---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------

---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to