Mailing List Archive



Back to the month index Back to the list index

Mitch Shields (mshields@intellops.com)
Thu, 1 Apr 1999 12:00:28 -0600


Message-ID: <004a01be7c69$873acaa0$0101010a@200mmx>
From: "Mitch Shields" <mshields@intellops.com>
Subject: Re: Lite / Form Question
Date: Thu, 1 Apr 1999 12:00:28 -0600

I would like to add my support for some sort of object like that or the
ability in lite to create a string and then evaluate that string as though
it where a variable.

For instance, if I have form fields named $client_0, $client_1, $client_2, I
would like to be able to do something like this:

$i = 0
while ($i < 3)
{
  $value[$i] = $client_$i
}

Or is something like that available now?

----- Original Message -----
From: Corey Sanders <csanders@entropy.muc.muohio.edu>
To: Multiple recipients of list <msql-list@services.bunyip.com>
Sent: Wednesday, March 31, 1999 1:36 PM
Subject: Re: Lite / Form Question

> Mitch,
>
> You raise a programming issue in Lite that has also concerned me on
> several occassions. I'd like to be able to recieve an object in a
> lite/w3-msql script that contains all the processed form data. Something
> like in ColdFusion, so that the script recieving form data could access
> that form data like, "FORM.fieldname". That, coupled with an iterator
> loop, would solve your problems and many of mine.
>
> More realistically, from looking at the code, would be to have an array
> that contains all the form data. That, coupled with the existing system,
> could create a large memory footprint, but the ability to access form data
> as a set of information would be valuable.
>
> Another possible solution might be to have a "defined" operator as in
> several other possible scripting languages. That would require you to
> check every possible form element, but it would at least solve the
> problem.
>
> Bambi, what do you think? Loading the symbol table with "$FORM." doesn't
> seem that difficult, but I haven't looked into adding the iterator.
>
> -- Corey
>
>
>
>
>
> On Wed, 31 Mar 1999, Mitch Evans wrote:
>
> > Howdy!
> >
> > I'm using lite to generate a complex form, with many checkboxes.
> > The number of form items (checkboxes) is not static. I want to be
> > able to read these items (as variables) inside a lite script. I was
> > naming the checkboxes on the fly, from within the previous lite script:
> >
> > Lite Script 1:
> >
> > /* pseudocode */
> > while (data)
> > {
> > <input .... name="box" + $counter ...
> > $counter++;
> > }
> >
> >
> > Lite Script 2:
> >
> > /* ??? How do I read some "randomly" named variable? This is where
> > I need help.
> > */
> >
> > /* would like to do something like */
> > $count = 0;
> > while (maxBoxes)
> > {
> > $i = /* contents of $box$count */;
> > $count++;
> > }
> >
> >
> > Is there any way to do this in Lite? I could change each of the
> > boxes to a submit button with a value, I guess, but I really wanted
> > a separate submit and a single script to go through all of the user
> > selections at once. Any comments would be appreciated.
> >
> > Mitch
> >
> >
>