Webprogr: Link with automatic submit
onurb at xiludom.gro
Fri Oct 20 13:18:43 CEST 2006
Gregor Horvath wrote:
> As I am no expert web programmer I thought I'd better ask the experts if
> there is a simpler or better solution to my problem than the one I am
> thinking of. (using TurboGears)
> The problem
> I have a form. Ok. you can submit, validate it etc.
> Now I have a link on that form to another page.
> What I want is that the form gets automatically submitted and validated
> before the browser follows the link. If the validation has errors the
> link should not be followed.
> My solution
> Are there any other options?
yes : replace the link with another submit button, then in your
controller check which submit has been successful and take appropriate
Links are for GET request (which are supposed to be idempotent), and are
definitively *not* supposed to issue (even if indirectly) a POST request.
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list