This may be a bit difficult to explain, but here goes. I''m developing a web site which has a nice AJAX part to it (thanks to rails). You just click on the link and it take you to the ajax part which is on a seperate page. -The user then selects directories or files from via a multiple menu. -When the user selects a directory (and hits the submit button) the menu is updated with the next directory selected. -When the user selects a file (and hits the submit button) the application should go back to the previous page and display the file he/she selected. OK this does work apart from the fact that after the file is selected and the page goes back, the URL is still displaying the AJAX enhanced page. I''d like it to display the URL of the page it went back to otherwise I know the user will start to question this. does anyone know how to escape from that? Cheers. -- Posted via http://www.ruby-forum.com/.
fish man wrote:> This may be a bit difficult to explain, but here goes. > > I''m developing a web site which has a nice AJAX part to it (thanks to > rails). You just click on the link and it take you to the ajax part > which is on a seperate page. > > -The user then selects directories or files from via a multiple menu. > > -When the user selects a directory (and hits the submit button) the menu > is updated with the next directory selected. > > -When the user selects a file (and hits the submit button) the > application should go back to the previous page and display the file > he/she selected. > > OK this does work apart from the fact that after the file is selected > and the page goes back, the URL is still displaying the AJAX enhanced > page. I''d like it to display the URL of the page it went back to > otherwise I know the user will start to question this. > > does anyone know how to escape from that? > > > Cheers.I think the last step you can use redirect the whole page to the one you want instead of using Ajax to update part of it. -Tony -- Posted via http://www.ruby-forum.com/.
yes I did try that, using redirect_to :action => ''blahblahblah'' but the URL was still the Ajax page so if you hit refresh it goes back to the original ajax page. but if i hit the back button it gives me what I want. Tony Jin wrote:> fish man wrote: >> This may be a bit difficult to explain, but here goes. >> >> I''m developing a web site which has a nice AJAX part to it (thanks to >> rails). You just click on the link and it take you to the ajax part >> which is on a seperate page. >> >> -The user then selects directories or files from via a multiple menu. >> >> -When the user selects a directory (and hits the submit button) the menu >> is updated with the next directory selected. >> >> -When the user selects a file (and hits the submit button) the >> application should go back to the previous page and display the file >> he/she selected. >> >> OK this does work apart from the fact that after the file is selected >> and the page goes back, the URL is still displaying the AJAX enhanced >> page. I''d like it to display the URL of the page it went back to >> otherwise I know the user will start to question this. >> >> does anyone know how to escape from that? >> >> >> Cheers. > > > I think the last step you can use redirect the whole page to the one you > want instead of using Ajax to update part of it. > > -Tony-- Posted via http://www.ruby-forum.com/.
use RJS templates... I had this "exact" problem, but RJS did the trick. within my "login.rjs" template that get''s invoked after my login process, it returns to the same page with an error message on error, or... if the login was successful, it needs to "redirect" to another controller... which is pretty much impossible to do otherwise. so, my "login.rjs" looks like: if @logged_in_client page.replace_html "message", :partial => ''shared/bad_login'' else page.redirect_to "whatever you want here" end i was scared to use edge rails at first, but now i swear by it :) On 2/22/06, fish man <danperrett07087@yahoo.com> wrote:> > yes I did try that, using redirect_to :action => ''blahblahblah'' > but the URL was still the Ajax page so if you hit refresh it goes back > to the original ajax page. but if i hit the back button it gives me what > I want. > > > Tony Jin wrote: > > fish man wrote: > >> This may be a bit difficult to explain, but here goes. > >> > >> I''m developing a web site which has a nice AJAX part to it (thanks to > >> rails). You just click on the link and it take you to the ajax part > >> which is on a seperate page. > >> > >> -The user then selects directories or files from via a multiple menu. > >> > >> -When the user selects a directory (and hits the submit button) the > menu > >> is updated with the next directory selected. > >> > >> -When the user selects a file (and hits the submit button) the > >> application should go back to the previous page and display the file > >> he/she selected. > >> > >> OK this does work apart from the fact that after the file is selected > >> and the page goes back, the URL is still displaying the AJAX enhanced > >> page. I''d like it to display the URL of the page it went back to > >> otherwise I know the user will start to question this. > >> > >> does anyone know how to escape from that? > >> > >> > >> Cheers. > > > > > > I think the last step you can use redirect the whole page to the one you > > want instead of using Ajax to update part of it. > > > > -Tony > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060222/afcc190f/attachment-0001.html