Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Anchor Tag in default.asp causes page to reload???

Reply
Thread Tools

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

 
 
Dominic
Guest
Posts: n/a
 
      11-12-2003
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
 
Reply With Quote
 
 
 
 
Aaron Bertrand [MVP]
Guest
Posts: n/a
 
      11-12-2003
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?




"Dominic" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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



 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      11-12-2003
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Dominic
Guest
Posts: n/a
 
      11-12-2003
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




>
> 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.

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      11-13-2003
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.

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


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]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      11-13-2003
> http://Server/#fred
>
> I think it should be http://Server#fred


No, #bookmarks apply to a *page* not a server.


 
Reply With Quote
 
Dominic
Guest
Posts: n/a
 
      11-14-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
anchor causes asp:requiredfieldvalidator to light up =?Utf-8?B?SmVycnkgSg==?= ASP .Net 0 12-08-2006 11:14 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
print page from anchor tag on news.versatel.de Javascript 0 10-27-2004 02:32 PM
div tag and anchor tag eivind Javascript 1 01-15-2004 09:39 AM
Postback causes 100=Continue, causes double download prompt? Xavier Osa ASP .Net 0 01-09-2004 11:17 AM



Advertisments