SA Developer .NET

Welcome to SA Developer .NET Sign in | Join | Help
in Search

Maintaining Scrollbar position on JSP page after postback

Last post 07-30-2008, 11:56 by horatio. 4 replies.
Sort Posts: Previous Next
  •  07-29-2008, 14:54 13752

    Maintaining Scrollbar position on JSP page after postback

    Hi all,

    I have a very unique problem with the one (very, very large and customised) JSP web-app I am currently maintaining for our overseas clients. The problem is, when the app was developed, it was developed in the following way:

    There are multiple pop-ups in the various pages, that, when you change something in the pop-up, it immaediately affects the parent window (i.e. does a postback) to reflect the changes (the pop-ups are usually detail screens where you can enter/edit quantities, for example). When the postback is done, obviously the page is back at the top of the page after postback (coordinates 0,0). Now, the client has been complaining about this because sometimes they create huge contracts with the application that eventually creates a very big page (we didn't design the application originally, we took over from another company that went belly-up). Now, I know most of you are thinking:

    "WHAT? Haven't you heard of JavaScript and hidden input controls?", which works great, except the app's pages are built from custom JSP tags (I mean everything, from the HTML tag to the final tag), which I think, wipes out any input controls I place in the pages and re-creates them on every postback (or when clicking Back in the browser). Is there any way I can maintain scroll page position using JSP server side code?

    Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!!

    The H................


    The Question is the Answer, and the Answer is the Question!
  •  07-29-2008, 17:55 13759 in reply to 13752

    Re: Maintaining Scrollbar position on JSP page after postback

    Hey guys,

    Just had a brainwave!!!

    What about using cookies? Huh?

     


    The Question is the Answer, and the Answer is the Question!
  •  07-30-2008, 11:03 13768 in reply to 13759

    Re: Maintaining Scrollbar position on JSP page after postback

    horatio:

    Hey guys,

    Just had a brainwave!!!

    What about using cookies? Huh?

    here is a cool article about doing it with javascript - http://aspnet.4guysfromrolla.com/articles/111407-1.aspx

    asp.net 2.0 has this functionality built into the page object and it works like a bomb.


    SA Developer .Net Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
  •  07-30-2008, 11:09 13769 in reply to 13768

    Re: Maintaining Scrollbar position on JSP page after postback

    fridgi:

    asp.net 2.0 has this functionality built into the page object and it works like a bomb.

    You mean it explodes??? Stick out tongue


    "I would love to change the world, but they won't give me the source code"
    Meeting Place - chat online with anyone, anytime, no downloads or plugins required
  •  07-30-2008, 11:56 13771 in reply to 13769

    Re: Maintaining Scrollbar position on JSP page after postback

    Hi guys.

     

    Have got a framework going with cookies. Busy debugging it now.

     

    Will let you know how it turns out!


    The Question is the Answer, and the Answer is the Question!
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems