Want to jump/scroll to a certain row in a table

Hi

This might be more of an HTML question but it could be because of an
interaction with Rails that the solution I use right now is not
working.

I have tried several ways to jump/scroll to a certain row in a large
table, I tried an event like

and use
http://website#section#666
I inserted the div with the even before the and after it, both
did not work

I have also tried to use (found this also on the
web somewhere) but it also did not work.

Is there another solution that is more rails friendly? What am I
messing up?

You’re just using the wrong syntax. Use id=“event666” and link to it
like http://some/url#event666

2009/10/1 Matt [email protected]:
I have tried several ways to jump/scroll to a certain row in a large
table, I tried an event like

and use http://website#section#666
I inserted the div with the even before the and after it, both
did not work

I’ve started using this recently:

http://demos.flesler.com/jquery/scrollTo/


Greg D.
http://destiney.com/

Matt wrote:

Hi

This might be more of an HTML question but it could be because of an
interaction with Rails that the solution I use right now is not
working.

I have tried several ways to jump/scroll to a certain row in a large
table, I tried an event like

and use
http://website#section#666
I inserted the div with the even before the and after it, both
did not work

Right. This won’t work, both because jumping to an ID doesn’t work and
because a div can’t surround a TR.

I have also tried to use (found this also on the
web somewhere) but it also did not work.

This is the correct tag – but you can’t put a # into the name. What
you want is . Then to refer to it, use the
http://url/of/the/page#some_name .

Is there another solution that is more rails friendly? What am I
messing up?

You’re messing up basic HTML syntax, nothing to do with Rails directly.
:slight_smile:

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Thank you! That with:
<% if @section>0 %>

<% end %>

at the start of the file was all that was needed!

On Oct 1, 1:42 pm, Marnen Laibow-Koser <rails-mailing-l…@andreas-

2009/10/1 Matt [email protected]:

did not work
I believe div is not valid round a row (or cell for that matter), it
can only encompass the whole table or be within a cell. Paste your
html into the w3c htlm validator to check. Different browsers behave
inconsistently with this sort of html error, it may appear to work
with some.

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs