[ic] actionmap and mv_nextpage in forms
Doug Alcorn
doug at lathi.net
Mon Aug 25 22:42:01 EDT 2003
Mike Heins <mike at perusion.com> writes:
> Quoting Doug Alcorn (doug at lathi.net):
>> I've setup an actionmap (which I think are a great way make urls look
>> readable) that uses a url something like
>> "foo/12332234/bar/456464646". Basically I'm trying to relate two
>> different types of products together in a single page. I know the
>> actionmap works because I can type in the url and the page loads just
>> as I'd expect it to. I verified that the path is being parsed
>> correctly and the page is interpreting the results just like I want.
>>
>> The foo product is actually related to a group of bar products. What
>> I'm trying to do is have a page the details the relationship between a
>> single foo product and a single bar product. However, I want to have
>> a drop down list that allows the shopper to change the bar product.
>
> mv_nextpage is not a URL -- it is a page name. ActionMap depends on it being the URL
> referencing the site..
Thanks for this clarification. It's sent me in the right direction.
[snip working example]
> It won't work without JS, though.
OK, this is a kludge, but works:
,----[ detail page select form ]
| <form action="[area process]">
| <input type="hidden" name="mv_todo" value="refresh" />
| <input type="hidden" name="mv_nextpage" value="bouncedetail" />
| <select name="nextpage" onchange="this.form.submit();">
| [query type=list prefix=bar
| sql="select id, display_name from bar where foo='[scratch foo_code]'"]
| <option value="foo/[sql-param code]/bar/[bar-param id]" [calc]
| return "selected" if "[bar-param id]" eq "[scratch bar_code]";
| [/calc]>[bar-param display_name]</option>
| [/query]
| </select>
| <input type="submit" value="Switch Bar">
| </form>
`----
,----[ bouncedetail.html ]
| [tmp page][area href="[value nextpage]"][/tmp]
| [bounce href="[scratch page]"]
`----
--
(__) Doug Alcorn - Unix/Linux/Web Developing
oo / PGP 02B3 1E26 BCF2 9AAF 93F1 61D7 450C B264 3E63 D543
|_/ mailto:doug at lathi.net http://www.lathi.net
mailto:tarpit at lathi.net is a spam trap
More information about the interchange-users
mailing list