Hello All!

There is a database action that I want to do in several views.

Right now, I have it implemented as a link in each view as

     <a href="db_action?id={{=item_id}}">Toggle Status</a>


How do I get my db_action()  controller to return back to the page
with the link that called it?

Is there a way to cause the browser to do the equivalent of the "back"
button?

Something like:

     response.view = find_the_controller(request.env.http_referer)
     return dict()

won't work because I'm not returning the proper dictionary for the
referring controller.

Maybe something like:

     dict_from_referring_controller =
run_referring_controller( request.env.http_referer )
     # ? do I have to define the response view?
     return dict_from_referring_controller



Perhaps the nicest/cleanest implementation would be with AJAX/JQuery,
but I haven't learned that yet.

Is there a way to do it with <a href> links?  Or is that super-bad
form?

Thanks!
Luis.

Reply via email to