Can I make a page open at the last line without having page#zzz in the address bar?

Discussion in 'Javascript' started by Jake, Jun 7, 2004.

  1. Jake

    Jake Guest

    Hi all

    I have a webpage that contains a long table and it would be nice if on opening with http://page.asp
    the browser automatically jumps to the last line, without showing http://page.asp#bottom
    in stead of http://page.asp in the address bar.

    Currently I use this small script at bottom

    ---------- table display code----------
    --

    </tbody>
    </table>
    <a name='bottom'></a><script type='text/javascript'>window.location = '#bottom';</script>
    </body></html>

    Is there a way?
    Thank you all

    --
    Windows98 links to solutions http://jake98.no-ip.info
    Replies in the same thread please
    Regards Jake
     
    Jake, Jun 7, 2004
    #1
    1. Advertising

  2. Jake

    G Roydor Guest

    Re: Can I make a page open at the last line without having page#zzzin the address bar?

    Voyez la méthode scroll ; il vous faudra determiner la longueur de la
    fenetre

    GR

    Jake a écrit:
    > Hi all
    >
    > I have a webpage that contains a long table and it would be nice if on opening with http://page.asp
    > the browser automatically jumps to the last line, without showing http://page.asp#bottom
    > in stead of http://page.asp in the address bar.
    >
    > Currently I use this small script at bottom
    >
    > ---------- table display code----------
    > --
    >
    > </tbody>
    > </table>
    > <a name='bottom'></a><script type='text/javascript'>window.location = '#bottom';</script>
    > </body></html>
    >
    > Is there a way?
    > Thank you all
    >
     
    G Roydor, Jun 7, 2004
    #2
    1. Advertising

  3. Jake

    Jake Guest

    Hi Andrew Thompson,

    > On Mon, 07 Jun 2004 19:05:05 GMT, Jake wrote:
    >
    > > I have a webpage that contains a long table and it would be nice if on opening with http://page.asp
    > > the browser automatically jumps to the last line, without showing http://page.asp#bottom
    > > in stead of http://page.asp in the address bar.

    >
    > If you want the last line to be prominent..
    > why not reverse the order of the data?
    >
    > --
    > Andrew Thompson
    > http://www.PhySci.org/ Open-source software suite
    > http://www.PhySci.org/codes/ Web & IT Help
    > http://www.1point1C.org/ Science & Technology


    Thanks for replying,
    The idea is not bad, but not practical for a few reasons:
    1. The data is coming from a file, where events are appended at the tail, with time/date stamp
    2. I prefer having the most recent events at the bottom
    3. Option to print the document with browsers button, older events usually on top of page

    --
    Windows98 links to solutions http://jake98.no-ip.info
    Replies in the same thread please
    Regards Jake
     
    Jake, Jun 7, 2004
    #3
  4. Jake

    Lee Guest

    Jake said:
    >
    >Hi all
    >
    >I have a webpage that contains a long table and it would be nice if on opening
    >with http://page.asp
    >the browser automatically jumps to the last line, without showing
    >http://page.asp#bottom
    >in stead of http://page.asp in the address bar.


    <body onload="scrollTo(0,9e9)">

    The number 9e9 being Stockton's Constant, a large number represented by few
    characters.
     
    Lee, Jun 7, 2004
    #4
  5. Jake

    Jake Guest

    Hi Lee,

    > Jake said:
    > >
    > >Hi all
    > >
    > >I have a webpage that contains a long table and it would be nice if on opening
    > >with http://page.asp
    > >the browser automatically jumps to the last line, without showing
    > >http://page.asp#bottom
    > >in stead of http://page.asp in the address bar.

    >
    > <body onload="scrollTo(0,9e9)">
    >
    > The number 9e9 being Stockton's Constant, a large number represented by few
    > characters.


    Yesssss ! thats it!
    Works great !

    Thanks Lee

    --
    Windows98 links to solutions http://jake98.no-ip.info
    Replies in the same thread please
    Regards Jake
     
    Jake, Jun 7, 2004
    #5
  6. Jake

    Jake Guest

    Hi G Roydor,

    > Voyez la méthode scroll ; il vous faudra determiner la longueur de la
    > fenetre
    >
    > GR


    Merci GR,
    I will study that, but I have a perfect solution from Lee
    See further down
    Thank you too
    --
    Windows98 links to solutions http://jake98.no-ip.info
    Replies in the same thread please
    Regards Jake
     
    Jake, Jun 7, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    0
    Views:
    3,602
  2. John Hann
    Replies:
    0
    Views:
    6,167
    John Hann
    Aug 21, 2004
  3. Matt
    Replies:
    9
    Views:
    71,246
  4. Matt
    Replies:
    9
    Views:
    637
    kaeli
    Aug 23, 2004
  5. Replies:
    3
    Views:
    204
Loading...

Share This Page