Automatic navigation?

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??

On 20 November 2012 15:33, Joz P. [email protected] 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
Javascript Tutorial - Redirect for example.

Colin

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 …

Colin L. wrote in post #1085864:

On 22 November 2012 09:46, Joz P. [email protected] 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.

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?

On 22 November 2012 09:46, Joz P. [email protected] 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

Javascript Redirect

On Tuesday, November 20, 2012 9:04:34 PM UTC+5:30, Ruby-Forum.com User

On 22 November 2012 10:48, Joz P. [email protected] wrote:

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