That did the trick.  Actually, since the input data is in a form, the code ended up 
like this...

  <form action="calcResults#estimates" method="post">
  ... my form ...
  <input type="Submit" value="Calculate Estimated Results">
  </form>

Thanks!
- Joe

On Tue, 18 Jan 2000 20:09:16 -0700, John K. Peterson <[EMAIL PROTECTED]> wrote:

>On Tue, 18 Jan 2000, Joseph Pych wrote:
>
>> I have been trying to figure out how to link to a fragment within a
>> JSP page.  I have a section of a long JSP page that contains estimated
>> financials.  There's a button in that section to recalculate.  What I
>> would like to do is process the recalc, return to that page, and
>> scroll to that section.  In my JSP page, I coded the fragment as
>> follows:
>
>>   <P><a name="estimates">Estimated Results</a></P>
>
>> If I were using straight HTML, I could get there using a link similar
>> the following:
>
>>   myPage.html#estimates
>
>> I tried the corresponding JSP version in my Main.jsp page (similar to
>> duke's pet store):
>
>>  <jsp:forward page='myPage.jsp#estimates' />
>
>> To my dismay, this does not work and gives an error saying the page
>> does not exist (using just "myPage.jsp" works fine).  Does anyone know
>> how to code the functionality that I am looking for -- basically
>> scrolling to an anchored section in an HTML page???
>
>It the browser that interprets the #achor part of the URL, not the server.
>So, either make put the "#estimates" at the end of the original form
>action or link.  Or, use Javascript to set it.  Something like:
>
><script>
>
>document.location="#estimates"
>
></script>
>
>...if I remember correctly.
>
>John K Peterson  --  IT Services Development  --  Brigham Young University
>Internet: [EMAIL PROTECTED]                      Phone: (801) 378-5007
>
> ==========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to