theplant / containers

Better structures for building web applications
1 stars 0 forks source link

ajax actions #2

Closed bodhi closed 7 years ago

bodhi commented 7 years ago

With AJAX (JS) actions, how to:

  1. redirect after form submit (eg. login)
  2. re-render after form submit (eg. "thanks for subscribing to the newsletter)
sunfmin commented 7 years ago

redirect after form submit (eg. login)

It shouldn't use ajax submit, should go directly with form submit.

re-render after form submit (eg. "thanks for subscribing to the newsletter)

Handler returns json message, and javascript to show it in the container. Or support reloading container with additional user query params. then render message in the server, and reload container.