Not sure if I'm reading this right, but are you saying that: rule2 form.optiondefinition_2 = <option value=100>$110</option> <option value=110 selected>$110</option>
is the text that would be entered into the text box to built the select list? And the constraint is that you only have a single form field to play with? If so, then why not just pass a delimited array, like: 110, '$110', 0, 110, '$110', 1 I would think it would be easier to check for syntax issues than full code. Or alternatively, we can all gang up on your client to change their mind and let you use multiple form fields. Chad who would never gang up on a client On 6/17/05, Angus Johnson <[EMAIL PROTECTED]> wrote: > Thanks Scott. I would have approached it in a similar way but the > client insists on one field to define the options. (Actually there is > a whole lot of client side javascript so they don't want to rehash > that as well). > > The form where these options are displayed is made up of multiple > records like below. > > rule1 > form.optiondefinition_1 = > <option value=10>$10</option> > <option value=20 selected>$20</option>... > > rule2 > form.optiondefinition_2 = > <option value=100>$110</option> > <option value=110 selected>$110</option>... > > rule3 > form.optiondefinition_3 = > <option value=1000>$1000</option> > <option value=1100>$1100</option>... > > I really need to work out the best way to move option values out of > the single form field into an array. I was thinking there could be > some regex wizardry rather than parsing into xml?? > > > On 17/06/05, Scott Thornton <[EMAIL PROTECTED]> wrote: > > make the user enter "value", "selected y or no" , and "display text" into > > separate fields... then build it up whatever way you want to.... > > > > >>> [EMAIL PROTECTED] 06/17/05 10:19 am >>> > > Hoping to get your thoughts or approaches to this problem. > > > > I have a form where a user can define a select field to use in other > > forms. They basically list out the options that will be available. So > > for example in the definition (a text form field) they would enter > > something like this.... > > > > Rule 1 > > <option value=10>$10</option> > > <option value=20 selected>$20</option> > > <option value=30>$30</option> > > > > Now I need to do some server side validation on this form field to > > make sure that the options are properly constructed. I've been playing > > with converting the field to an xml object then moving the options > > into an array and testing on this. Is this the best approach or is > > there another better/simpler/lazy way to do it? > > > > Thanks in advance. > > Angus > > > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to [EMAIL PROTECTED] > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to [EMAIL PROTECTED] > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ > --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
