I'd like to know if it is possible to get a ActionForward to scroll my
target page to an anchor on the page created with the <a
name="xxx"></a>.

Problem Description
------------------------------
I have a page in struts (rather large form) where I have a drop-down
menu near the bottom with some choices. (AKA html:select and
html:optionsCollection)

When a user selects from that menu, I have a javascript.submit() that
occurs where my page action retrieves data based on the menu change
and populates another text block on the page below the pop-up. On the
page being 'refreshed' it has set the scroll position to the top of
the page -- which is the normal behavior.

I'd like to return to a named anchor on the page by the drop-down
menu. My Action.java code returns a "return
(mapping.findForward("myMessage"));"

In my struts-config.xml I also have the following: "<forward
name="myMessage" path="/Main/SomePage.jsp#name_reference"/>"

In the JSP page (SomePage.jsp) I have:

<html:link linkName="name_reference"></html:link>

But of course when I try and execute things, I get a 404 error::

        HTTP Status 404 - /Main/SomePage.jsp#name_reference
        
        type Status report
        
        message /Main/SomePage.jsp#name_reference
        
        description The requested resource
(/Main/SomePage.jsp#name_reference) is not available.
        Apache Tomcat/5.0.28

Removing the #name_reference from the struts-config.xml file gets
things working again -- just no scrolling to my anchor point.

Thanks in advance,

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to