Automatically scroll a page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatically scroll a page

Joseph Blatter
Hi. I have two components A and B. A is large and doesn't fit into the window. My user has scrolled inside A.

Now goes to B temporarly and finally goes back to A. But the component page is displayed at the start, not where he was.

It's possible to automatically scroll a page to a return point?

Regards


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Automatically scroll a page

Lukas Renggli
> It's possible to automatically scroll a page to a return point?

Yes, if A renders something like:

A>>renderContentOn: html
      html anchor name: 'a'.
      " rest the rendering code of A "

Then you can do before you call #answer: on B do something like:

   self session jumpToAnchor: 'a'.
   self answer: anObject

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Automatically scroll a page

Ron Teitelbaum
In reply to this post by Joseph Blatter

Hi Joseph,

 

I have an address table toward the bottom of a page.  When the user clicks new or edit an address component appears.  Since the component is at the bottom when it goes away the full page appears again.  The problem I needed to solve was to get the component to show fully in the screen when it was opened.  I did that by adding the following:

 

html anchor name: 'addressanchor'; script: (SUScript new goto: '#addressanchor').

 

When the address component is rendered it jumps to the top of the page.  You will need to have Scriptaculous loaded for it to work.

 

Hope that helps!

 

Ron Teitelbaum

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Blatter
Sent: Wednesday, February 07, 2007 11:06 AM
To: [hidden email]
Subject: [Seaside] Automatically scroll a page

 

Hi. I have two components A and B. A is large and doesn't fit into the window. My user has scrolled inside A.

Now goes to B temporarly and finally goes back to A. But the component page is displayed at the start, not where he was.

It's possible to automatically scroll a page to a return point?

Regards


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside