[ic] Calling flypage from a form

Jamie Neil interchange-users@icdevgroup.org
Fri Jun 27 05:48:01 2003


> -----Original Message-----
> From: interchange-users-admin@icdevgroup.org
> [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of Kevin Walsh
> Sent: 27 June 2003 01:24
> To: interchange-users@icdevgroup.org
> Subject: RE: [ic] Calling flypage from a form
>
>
> Jamie Neil [jamie@versado.net] wrote:
> >
> > Does anyone know if there is a way of calling a flypage from a
> form post?
> >
> > I want to put a simple text box at the top of the page into
> which users can
> > enter a product's sku and be sent straight to that products
> flypage. I guess
> > I could use a search and create a special results page to show
> the matching
> > product, but I'd really like to use the existing flypage if
> it's possible.
> >
> > I've tried using an mv_click block to set mv_nextpage to the
> value entered
> > on the form, but that doesn't seem to work.
> >
> > I kind of feel like I'm missing something obvious...
> >
> How about the following:
>
>     <form action="[process]" method="POST">
>         <input type="hidden" name="mv_todo" value="return">
>
>         [L]Item code[/L]:
>         <input type="text" name="mv_nextpage" value="">
>         <input type="submit" value="[L]Go[/L]">
>     </form>
>
> Or, if you need some form of SKU validation, you could use something
> like this:
>
>     <form action="[process]" method="POST">
>         <input type="hidden" name="mv_todo" value="return">
>         <input type="hidden" name="mv_click" value="set_nextpage">
>
>         [L]Item code[/L]:
>         <input type="text" name="sku" value="">
>         <input type="submit" value="[L]Go[/L]">
>     </form>
>
>     [set set_nextpage]
>         [if type="data" term="products::sku::[cgi sku]"]
>             mv_nextpage=[cgi sku]
>         [else]
>             mv_nextpage=invalid_sku
>         [/else]
>         [/if]
>     [/set]

Yeah - that was pretty much what I'd been trying to do, but I can't get it
to work :(

The post is successful because the user is sent to the "process.html" page,
and if they type in an invalid sku it either brings up a "page cannot be
found" error or the "invalid_sku" page in your example above. However on a
successful post, the returned page is always blank (the template is correct
one for the flypage but there is no content).

Can you confirm that this does actually work? (i.e. it's a problem with _my_
site rather than an IC problem).

Jamie