Thanks, your solution is exactly what I needed.
From: Wendy Smoak <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: named anchor and form
Date: Wed, 02 Feb 2005 16:09:17 -0700
From: "draegoon Z" <[EMAIL PROTECTED]>
> Hey guys, the archive text search ability is temporarily down, sorry.
Both http://marc.theaimsgroup.com and http://www.mail-archive.com have this
list archived.
> Problem is: when the page returns/refreshes I'm at the top, the user is
> confused or has to scroll down.
> I know I could probably accomplish this with javascipt, but wondering if
> there is a struts solution.
I have a long page with options to hide/show different sections. Hiding or
showing causes a round trip to the server, and I need to put the user back
where they clicked. So... in the Action, I do:
request.setAttribute( "anchor", "someString" );
and then at the bottom of the JSP, so it won't get executed until the page
has loaded all the way...
<c:if test="${anchor ne null}">
document.location = "#<c:out value="{$anchor}"/>";
</c:if>
HTH,
--
Wendy Smoak
---------------------------------------------------------------------
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]