Are there any best practices for implementing a back/cancel/return
button… even when the page you want to return people too is 2 pages
back (when people submit form and then want to return)?
===================================================================== http://www.soen.info - source of the freshest software engineering
information on the net http://cusec.soen.info - software engineering conference
Hey John ! I just use the session[], and keep track of the pages…
etc.
I think that is about the best way to do it as far as I know. Just did
this
this morning
===================================================================== http://www.soen.info - source of the freshest software engineering
information on the net http://cusec.soen.info - software engineering conference
none. when im on the first page of the form, i set something new in the
session, like: session[:user_reg_first], with an arbitrary value. when
they get to the second page, i do the same but with
session[:user_reg_second]…etc…etc.
if someone is on the first page, and tries to go to the third, i make
sure
they have a valid entry in session[:user_reg_third], if they don’t, I
check
session[:user_reg_second]…etc
i think you get the idea. it’s a verbose method… but it works for me
===================================================================== http://www.soen.info - source of the freshest software engineering
information on the net http://cusec.soen.info - software engineering conference
I think you two were misunderstanding each other… Dylan was talking
about controlling
which page in a sequence of pages a user can go to (a “wizard”), whereas
John just wants
to create a back-button link.
N’est pas?
b
PS: John, why not just make the “back” link go the url it should? You
solution won’t work
if javascript’s not enabled (though we’re basically turning into a
javascript or nothing
world).
On Tue, Feb 14, 2006 at 06:49:37PM -0500, John K. wrote:
Are there any best practices for implementing a back/cancel/return
button… even when the page you want to return people too is 2 pages
back (when people submit form and then want to return)?
I use this code when I know I will have to redirect a user back:
def store_location
session[:return_to] = request.request_uri
end
def redirect_back
redirect_to(session[:return_to])
end
You could use session[:return_to] to create a back link.