Google suggests with the hash - e.g. http://www.devguru.com/technologies/ecmascript/QuickRef/location_hash.html - although if it doesn't work I'd go back to basics with a QuickStart and check it works with just minimal pages, then see about adding your other page elements.
/Gwyn On Wed, Jun 18, 2008 at 2:22 AM, Michael Mehrle <[EMAIL PROTECTED]> wrote: > Oh, and for the anchor string - do I include the hash as well? I added > the call below without the hash and it's not jumping to that anchor. > Frustrating... > > Michael > > -----Original Message----- > From: Michael Mehrle [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 17, 2008 6:19 PM > To: users@wicket.apache.org > Subject: RE: Browser not jumping to Wicket Anchor > > Just curious - what does 'location.hash' stand for? In any case, is this > supposed to cause the page to jump to the anchor? > > Michael > > -----Original Message----- > From: Gwyn Evans [mailto:[EMAIL PROTECTED] > Sent: Monday, June 16, 2008 2:51 PM > To: users@wicket.apache.org > Subject: Re: Browser not jumping to Wicket Anchor > > Not an issue I've come across but also not an area I've explored... A > quick > search through the mailing list did suggest one possible approach as > below, > but I've no idea how viable it might be! > > public Page extends WebPage implements IHeadContributor { > ........ > @Override > public void renderHead(IHeaderResponse r) { > r.renderOnLoadJavascript("location.hash='YOUR-ANCHOR'"); > } > } > > /Gwyn > > On Mon, Jun 16, 2008 at 10:33 PM, Michael Mehrle > <[EMAIL PROTECTED]> > wrote: > > > Yes - they do match - you're right, always check the basics first. The > > problem is that even if I bookmark the anchored page (with the anchor > > tagged on), and load the page it won't jump there. So, I don't think > > it's the way I create the anchor (because the URL looks correct) - > it's > > all the other wicket AJAX stuff that somehow prevents the anchor from > > being recognized on page load. Is there a work around for this? > > > > Thanks, > > > > Michael > > > > -----Original Message----- > > From: Gwyn Evans [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 16, 2008 1:02 PM > > To: users@wicket.apache.org > > Subject: Re: Browser not jumping to Wicket Anchor > > > > Just looking at the HTML, do the anchor & the destination match > > correctly? > > Is the destination url just a normal page, or a form of some sort? > > > > /Gwyn > > > > On Mon, Jun 16, 2008 at 6:58 PM, Michael Mehrle > <[EMAIL PROTECTED]> > > wrote: > > > > > I created an Link to another page's anchor similar to the code shown > > > below. The anchor actually gets tagged on to the bookmarkable URL. > > > However, for some reason the browser does not jump to my anchor. > > > > > > > > > > > > Not sure what's going on - is there a particular way I have to > create > > an > > > anchor in Wicket so that the URL causes the browser to scroll > further > > > down in the page? > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Michael > > > > > > > > > > > > > > > > > > public class AnchoredBookmarkablePageLink extends > BookmarkablePageLink > > { > > > > > > > > > > > > private static final long serialVersionUID = 1L; > > > > > > > > > > > > private IModel stringAnchor; > > > > > > > > > > > > public AnchoredBookmarkablePageLink(String id, Class pageClass, > > IModel > > > > > > > > > anchor) { > > > > > > super(id, pageClass); > > > > > > this.stringAnchor = anchor; > > > > > > } > > > > > > > > > > > > public AnchoredBookmarkablePageLink(String id, Class pageClass, > > > > > > PageParameters params, IModel anchor) { > > > > > > super(id, pageClass, params); > > > > > > this.stringAnchor = anchor; > > > > > > } > > > > > > > > > > > > @Override > > > > > > protected CharSequence appendAnchor(ComponentTag tag, CharSequence > > > url) { > > > > > > url = url + "#" + stringAnchor.getObject().toString(); > > > > > > return url; > > > > > > } > > > > > > > > > > > > } > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >