Re: Jump to named anchor after form processing

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Evertjan. (exjxw.hannivoort_at_interxnl.net)
Date: 10/20/04


Date: 20 Oct 2004 08:06:05 GMT

Robert Mark Bram wrote on 20 okt 2004 in
microsoft.public.inetserver.asp.general:

> Hi All!
>
> Let's say I have a form like this:
>
> <form action="handler.asp"> ... </form>
>
> Within handler.asp, I output a number of named anchors:
>
> <a name="important1">Important 1</a> ...
> <a name="important2">Important 2</a> ...
> <a name="important3">Important 3</a> ...
>
> In my form processing code, I want the returned page to jump to one of
> these anchors depending on the result of the processing.
>
> How can I do this?
>
> I don't want to use a redirection because then I would have to
> re-process the same page..
>
> Any advice would be most appreciated!

I would not use a <form> here.

Try:

<a href="#important1">Important 1</a><br>
<a href="#important2">Important 2</a>

and keep the anchors on the same page:

<a name="important1"></a>What is important 1 ...
<a name="important2"></a>What is important 2[too?] ...

The browser cache will not send a request to the server if your asp code
allows a long enough expiry time[-out], say:

<% Response.Expires = 40 %>

[and do not use <base href=> or no-cache meta directives here!]

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)