Marnen Laibow-Koser wrote:

> Sure: <%= link_to 'Back', '#', {}, :onclick => 'history.go(-1)' %>
> 
> In most browsers, this will behave *exactly* like the Back button --
> if the user has JavaScript turned on.

Hi Marnen:

Thanks for your help.

I have "<%= javascript_include_tag 'prototype' %>" in the layout head.

But the code above doesn't work. Is there a different "turn on 
JavaScript" line of code needed?

After much digging and searching I discovered this:

<a href="Javascript:history.go(-1)">Back</a>

I think it automatically turns on JS. I am using NB 6.5 for Ruby/Rails.


For the record: I have installed the will_paginate gem. Will test it 
out. It does offer some better navigation options (I think.)

The other solution to "id" each line in the index view? Will it lead to 
more coding, maintenance overhead?

So, far Javascript:history...   and   will_paginate  look good.


Any votes?

TIA

Ken


-- 
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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to