Forcing the focus of the browser to the top of the screen

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Forcing the focus of the browser to the top of the screen

mfpaschal

Hi Folks,
 
We have a form that can get kind of long. We have previous/next buttons at the bottom. These buttons do not do a xforms:load to another xform but instead will cause a trip to the server which will paint the next or previous screen.
 
Sometimes, because the forms are long, we end up somewhere in the middle of the browser. In other words, the scroll bars are not at the top.
 
Is there some way to programatically force the scroll bars to be at the top of the browser?
 
Any help most welcome!
 
Thanks,
Mike Paschal


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Forcing the focus of the browser to the top of the screen

fl.schmitt(ops-users)
Mike,

> Is there some way to programatically force the scroll bars to be at
> the top of the browser?

maybe a workaround (not tested):

- place a <span id="top" /> or <a name="top" /> at the top of each form;
- issue a xforms:load resource="#top" on ev:event="xforms-submit-done"

HTH
florian


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws