You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wendy Smoak <ja...@wendysmoak.com> on 2004/07/09 20:17:52 UTC

[OT] Re: # anchor

From: <gd...@cmhc-schl.gc.ca>
> However, the user would like to have the page move down a little so the
> that the report section is more apparent.
> I have tried to use the # anchor but keep getting page not found...

The # is probably in the wrong place in the URL, what have you tried that
doesn't work?

I do it with JavaScript:
<script>document.location = "#12";</script>

It's done conditionally in the footer of every JSP, so all I have to do is
set a request Attribute named 'anchor' and it will be rendered:
<c:if test="${anchor ne null}">
  <script>
    document.location = "#<c:out value="${anchor}"/>";
  </script>
</c:if>

That wiill tack on the #something to the end of the URL and the page will
jump to the anchor.

-- 
Wendy Smoak


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org