On Sep 29, 11:14 am, FM <[EMAIL PROTECTED]> wrote:
> On Sep 29, 10:58 am, Frederick Cheung <[EMAIL PROTECTED]>
> wrote:> On 29 Sep 2008, at 09:31, FM wrote:
>
>
> However, now I have another question :)
> The comment form is located at the end of the page. So basically, when
> the user submit a comment, I would like the page to be scrolled down
> to the 'comment_form' anchor (i.e., where flashes are currently
> displayed)
>
> I tried with this:
> form_for(@comment, :url => { :anchor => 'comment_form'})
> but doesn't seem to work.
>
> I think that the only solution to this is to put the flash zone at the
> beginning of the page, but maybe that there is some technique to get
> this behavior*.
>
If you are redirecting the user somewhere upon creation of the comment
then that redirect should specify the anchor.
Fred
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---