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 <div id="event#666"> and use http://website#section#666 I inserted the div with the even before the <tr> and after it, both did not work I have also tried to use <a name="event#666"> (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 <mattbogers-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > 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 <div id="event#666"> and use http://website#section#666 > I inserted the div with the even before the <tr> and after it, both > did not workI 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
> 2009/10/1 Matt <mattbogers-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > I have tried several ways to jump/scroll to a certain row in a large > table, I tried an event like <div id="event#666"> and use http://website#section#666 > I inserted the div with the even before the <tr> and after it, both > did not workI''ve started using this recently: http://demos.flesler.com/jquery/scrollTo/ -- Greg Donald http://destiney.com/
Marnen Laibow-Koser
2009-Oct-01 20:42 UTC
Re: want to jump/scroll to a certain row in a table
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 <div id="event#666"> and use > http://website#section#666 > I inserted the div with the even before the <tr> and after it, both > did not workRight. 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 <a name="event#666"> (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 <a name="some_name"></a>. 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. :) Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Thank you! That with: <% if @section>0 %> <script type="text/javascript"> // <!-- document.location.hash="id<%= @rowid %>"; // --> </script> <% 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- s.net> wrote:> 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 <div id="event#666"> and use > >http://website#section#666 > > I inserted the div with the even before the <tr> 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 <a name="event#666"> (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 <a name="some_name"></a>. Then to refer to it, use thehttp://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. > :) > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted viahttp://www.ruby-forum.com/.