On Tue, Aug 25, 2009 at 12:38 AM, Ulises <[email protected]> wrote:
>
> Hey people,
>
> I'm trying to have a form be submitted to a different page (so, not a
> POST/GET back). The scenario is a search form which renders on a front
> page as well as on the search page.
>
> E.g.:
>
> /index
> should include a form that submits to /search
>
>
> /search
> form that submits to itself
<form method="post" action="/search"><input type="text" name="search"
value=""/><input type="submit" value="Search"/></form>
In the snippet that handles the search page:
val searchTerm = S.param("search") openOr {S.error("no search term");
S.redirectTo(S.referer openOr "/")}
>
>
> Any hints on how to do this/were to look to learn how to do this? I
> guess that the form on the front page could be just static HTML
> however I'm not entirely sure how /search would deal with the form
> submission from a static form ...
>
> Cheers,
>
> Ulises
>
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---