Instead of asking the user to click on links to navigate to a new page, how can I implement automatic page navigation? I would imagine there is a method something like: if condition then move_to :controller => ... :action => ... Is there?? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 20 November 2012 15:33, Joz Private <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Instead of asking the user to click on links to navigate to a new page, > how can I implement automatic page navigation? > > I would imagine there is a method something like: > > if condition then move_to :controller => ... :action => ...You can do this at the client end using javascript. Use the setTimeout method. See http://www.tizag.com/javascriptT/javascriptredirect.php for example. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Is there a way to do this without Javascript? I haven''t used it before. For my Rails stuff at the moment (I''m just learning it) I want to stick to mainly Ruby and HTML, as that''s all I really know at this stage ... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 22 November 2012 09:46, Joz Private <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: Please quote the previous message so that it is easier to follow the thread. The only way anyone reading this will know what you are talking about is by looking back at the earlier email.> Is there a way to do this without Javascript?Not as far as I am aware.> > I haven''t used it before. For my Rails stuff at the moment (I''m just > learning it) I want to stick to mainly Ruby and HTML, as that''s all I > really know at this stage ...In that case you will have to stick to basic features until you can get round to learning about javascript - which is essential for anything other than a basic site. You will also need CSS knowledge. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1085864:> On 22 November 2012 09:46, Joz Private <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > Please quote the previous message so that it is easier to follow the > thread. The only way anyone reading this will know what you are > talking about is by looking back at the earlier email. > >> Is there a way to do this without Javascript? > > Not as far as I am aware. > >> >> I haven''t used it before. For my Rails stuff at the moment (I''m just >> learning it) I want to stick to mainly Ruby and HTML, as that''s all I >> really know at this stage ... > > In that case you will have to stick to basic features until you can > get round to learning about javascript - which is essential for > anything other than a basic site. You will also need CSS knowledge. > > ColinBut there was only one previous post ... extra clutter wasn''t needed. Ok, I''ve had a look at the Javscript and it seems ok. But now I''ve thought of another scenario: Up until now, I have had to request the user click on a hyperlink to navigate to the next page. But say the user inputs data to a form. Is it possible, once the data has been submitted (by clicking the "send" button), that this event can trigger automatic navigation to the next page? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 22 November 2012 10:48, Joz Private <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1085864: >> On 22 November 2012 09:46, Joz Private <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >> Please quote the previous message so that it is easier to follow the >> thread. The only way anyone reading this will know what you are >> talking about is by looking back at the earlier email. >> >>> Is there a way to do this without Javascript? >> >> Not as far as I am aware. >> >>> >>> I haven''t used it before. For my Rails stuff at the moment (I''m just >>> learning it) I want to stick to mainly Ruby and HTML, as that''s all I >>> really know at this stage ... >> >> In that case you will have to stick to basic features until you can >> get round to learning about javascript - which is essential for >> anything other than a basic site. You will also need CSS knowledge. >> >> Colin > > But there was only one previous post ... extra clutter wasn''t needed.I still had to look back at the previous message to remind myself what the question was about. Also remember these posts are archived and will be found by users searching for information. In that case it may not be trivial to see the previous post, and a message that says just "Is there a way to do this without Javascript?"> > Ok, I''ve had a look at the Javscript and it seems ok. But now I''ve > thought of another scenario: > > Up until now, I have had to request the user click on a hyperlink to > navigate to the next page. But say the user inputs data to a form. Is it > possible, once the data has been submitted (by clicking the "send" > button), that this event can trigger automatic navigation to the next > page?I don''t understand the question. Once the user has submitted the form it is entirely under your control (in the controller action) which page appears next, so you can make it navigate wherever you like. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.