Re: forms question

Christian L. Mogensen (mogens@CS.Stanford.EDU)
Thu, 18 Aug 1994 23:18:57 +0200

John Price-Wilkin writes:

[hint: check out the Usenet group comp.infosystems.providers for help
on forms and such]

> Now this obviously doesn't work. I've tried a number of things,
> including making each result a radio button selection. What I don't
> like about that is that you then have to choose a result and then make
> your way back up to the top to press the [submit] button, a real pain in
> the butt when you've got 100 items.

> I wonder if there's any way to offer someone a set of options (the view
> options in this case) that get registered as an environment variable
> without submitting the form, so that after this one can choose an item
> and have it be affected by the choice made earlier.

Nope - this is close to impossible - the current specs only allow one
submit button per form, and you can't save state from one transmission
to the next (unless you want to start managing session IDs) - so all
variables must be submitted each time. But you can embed the variable
in the URLs:
How about this (URLs omitted for clarity)
(Note the use of Path_INFO to provide the variable you mentioned)
<A http://url/100?querystring>word</A> (<A http://url/500?querystring>500</A>)
words or (<A http://url/all?querystring>all</A>)

Which renders as:
* _word_ (_500_ words or _all_)

Of course you can add more in there - note that the query string after
the ? is independent of the pathinfo, which makes this easy to extend.

Christian "CGI scripts lurking horror"