• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
scroll to anchor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scroll to anchor


  • Subject: scroll to anchor
  • From: Anthony B Arthur <email@hidden>
  • Date: Tue, 25 Mar 2008 12:32:32 -0400

I have code that will scroll to an anchor after a page refresh, but it always goes to the top.  How can I make it refresh with the anchor in the middle, or better yet, refresh with the anchor exactly where it was when the user invoked a submit?  The code I have is:

public void appendToResponse(WOResponse response, WOContext context) {
if (pageAnchor != null && advanceToAnchor) {
response.setHeader(context.componentActionURL() + "#" + pageAnchor, "location");
response.setHeader("text/html", "content-type");
response.setHeader("0", "content-length");
response.setStatus(302);
pageAnchor = null;
advanceToAnchor = false;
}else{
super.appendToResponse(response, context);
}
}

Any ideas?

-b

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: scroll to anchor
      • From: John Pollard <email@hidden>
  • Prev by Date: Web Core Service and SSL problem
  • Next by Date: Re: MySQL JDBC Connect Error
  • Previous by thread: Web Core Service and SSL problem
  • Next by thread: Re: scroll to anchor
  • Index(es):
    • Date
    • Thread