Jump to named anchor after form processing

R

Robert Mark Bram

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!

Rob
:)
 
E

Evertjan.

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!]
 
R

Robert Mark Bram

Hi Evertjan!

Thank you for your response.
I would not use a <form> here.

Hmm... but there is some user input that I need to obtain in order to do
my processing.
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 %>

I don't quite understand what is happenning here. The page blocks for a
while, waiting for some response?

Rob
:)
 
E

Evertjan.

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

Thank you for your response.


Hmm... but there is some user input that I need to obtain in order to
do my processing.

then use seperate forms:

<form action="#important1" method=post>
<input your user input for posting
</form>
<form action="#important2" method=post>
<input your user input for posting
</form>

or use clientsied scripting to cange the action string.

OT on this ASP NG!!!
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 %>

I don't quite understand what is happenning here. The page blocks for
a while, waiting for some response?

Its unclear what you mean with "blocks".

Anyway, as it is not an ASP problem, [except for the timeout],
this is OT.

I suggest you ask in a cliendside code NG.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top