Re: OT CGI script with target in the body
- From: Scott W Gifford <gifford@xxxxxxxxx>
- Date: Wed, 17 Aug 2005 16:23:52 -0400
"Jesse F. Hughes" <jesse@xxxxxxxxxxxxx> writes:
> xhoster@xxxxxxxxx writes:
>
>>> Both buttons need the information from the same form. It is slightly
>>> preferable if button one opens a new window for displaying the search
>>> results, so that the form is still present at all times. (For
>>> technical reasons, I don't want to have to use the back arrow to
>>> re-display the form.)
>>
>> Make use of the sticky-fields feature of CGI.pm. Have button one perform
>> the search, display the results of that search, and then re-display the
>> form (already filled out) for further action.
>
> Yes, that's an option. I've done something similar in another
> context.
>
> The only problem is (you knew it was coming)... it's not so visually
> appealing in this case. The first button finds matching photos from
> a database and displays thumbnails for up to the first 40 of them
> (with buttons to page through all of the photos). It's just a bit
> inconvenient to place a form below that (and even then, the user may
> want to alter his search parameters and re-display the results before
> updating, so I'd still need *both* buttons).
You could store the last entry somewhere when the "preview" button is
pressed, then have the "save" button just use that last entry (which
would let you use a seperate form for it). You could save it
client-side in a cookie, or server-side in session file. It can break
if there are multiple windows with the same client or session
simultaneously previewing and saving different parts of the database,
so if that sort of thing might happen you'll need to take special
care.
Another option is to digest the first results, save them in CGI
fields and redisplay, then have a link on the second page that says
"preview changes in new window" that will pass along those parameters
to a preview script, and also a button that says "Save" that passes
along the same parameters to a save script.
----Scott.
.
- References:
- Re: OT CGI script with target in the body
- From: Gunnar Hjalmarsson
- Re: OT CGI script with target in the body
- From: Jesse F. Hughes
- Re: OT CGI script with target in the body
- From: Gunnar Hjalmarsson
- Re: OT CGI script with target in the body
- From: Jesse F. Hughes
- Re: OT CGI script with target in the body
- From: xhoster
- Re: OT CGI script with target in the body
- From: Jesse F. Hughes
- Re: OT CGI script with target in the body
- Prev by Date: Re: OT CGI script with target in the body
- Next by Date: Namespace for apartment threading modules ?
- Previous by thread: Re: OT CGI script with target in the body
- Next by thread: CPAN, packaging tools, META.yml
- Index(es):