[ic] Calling flypage from a form
Kevin Walsh
interchange-users@icdevgroup.org
Thu Jun 26 20:24:01 2003
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]
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/