Anchor Tag in default.asp causes page to reload???

D

Dominic

I have a home page on an intranet called default.asp I just type in
the server name to take me to the default page http://server. The home
page has an anchor name tag: <A name="fred">Freds Info</A>

It is located by this anchor href tag: <A href="#fred">Up to Freds
Info</A>

The problem is that when I first use the link to take me up to Freds
Info, the default.asp page is reloaded then I am taken to the Freds
Info, which is a pain I dont want this to happen. I just want to click
the link and be taken to the part on the page.

After the page is reloaded I can then use the link again to go up to
Freds Info without the page reloading. What is the problem? Any help
would be appreciated. I am using IIS 4.0 on Windows NT.
Dominic
 
A

Aaron Bertrand [MVP]

Have you accessed the file using //server/ or //server/default.asp? Can you
put a copy of the page up somewhere, so we can try to reproduce, rather than
guess what is really happening?
 
E

Evertjan.

Dominic wrote on 12 nov 2003 in microsoft.public.inetserver.asp.general:
I have a home page on an intranet called default.asp I just type in
the server name to take me to the default page http://server. The home
page has an anchor name tag: <A name="fred">Freds Info</A>

It is located by this anchor href tag: <A href="#fred">Up to Freds
Info</A>

1 This has nothing to do with ASP, so please follow up on a clientside NG.

2 Cashe reloading is standard behavour of accessing an anchor, intra or
internet. An eventual server reload is possibly caused by an non-cashe
command. If you just want to scroll use clientside javascript scrollTo() in
an onclick.
 
D

Dominic

Hello Evertjan and Aaron thanks for your replys.

This is what I see in the message window of IE5.0 when I hover over
the link.

http://Server/#fred

I think it should be http://Server#fred

Seeing that I have the default document already in the temporary
internet file folder as http://Server it should not have to ask the
server for a new page.

However I do have Cache:Control no-cache as a header in IIS4.0 so that
documents loaded to the browser from the default page links are not
cached.

The Html for the anchor tags is the same as previously posted.

I am not sure of the scrollTo()?? or how it works and what does NG
mean?

Thanks people.
Dominic
 
E

Evertjan.

Dominic wrote on 13 nov 2003 in microsoft.public.inetserver.asp.general:
This is what I see in the message window of IE5.0 when I hover over
the link.

In the status bar, I preaume.

No, no,

http://Server and http://Server/ are short for http://Server/index.asp
[if your IIS defaults to index.asp, that is].

http://Server/#fred means http://Server/index.asp#fred

http://Server#fred is illogical and probably would not work, because
Server is not a file but the virtual root directory. You can try it in
your browser and wil see the browser replaces that immediately by adding
the slash. [IE6 tested]
Seeing that I have the default document already in the temporary
internet file folder as http://Server it should not have to ask the
server for a new page.

However I do have Cache:Control no-cache as a header in IIS4.0 so that
documents loaded to the browser from the default page links are not
cached.

It does not influence the links, just the pages themselves.

So every http://Server/index.asp#fred will reload from the server, as
promised.

Why not remove the no-cache if you hate it for this page.
[..]
I am not sure of the scrollTo()?? or how it works and what does NG
mean?

scrollTo() is clientside Javascript [you were in fact asking for a
clientside solution] and NG is [this] NewsGroup

[please do not bottom quote on usenet, but top/interquote sparingly]
 
D

Dominic

Thanks again Aaron and Evertjan,
You have been both helpful :)
I can understand now Evertjan about what you have been showing me and
I guess because I have the no-cache turned on that this is the main
problem, not the asp and not the html. I will turn it off and see how
I go. Thanks for all the other bits you have identified such as the
'status bar' and the http:server/ etc.
Aaron thanks for your help.
I'll be back with good news I hope.
cheers
Dominic
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top