If the visitor should stay on the same page, you can leave out the url
and only specify the anchor in href.

<a href="#top"> ... </a>

The "problem" you've been facing here, probably is caused by the
APPEND_SLASH setting, enforced by the CommonMiddleWare I think. It's
used to ensure that a page has one, and only one, URL. www.example.com/blog
and www.example.com/blog/ deliver the same content, but the URL is
different. Therefore, incoming requests without a slash at the end are
redirected by the middleware.

So you *always* end up with a url like http://example.com/myproj/mypage/,
and therefore http://example.com/myproj/mypage#top was redirected
first. You better only specify the anchor, that way you don't have to
care about the page's URL at all.

Regards,
Reiner

On Mar 18, 4:59 pm, NoviceSortOf <dljonsson2...@gmail.com> wrote:
> Thanks for the answer...
>
> Looking closer and testing direct on the URL Navigation bar using cut
> and paste figured out the following
>
> A slash "/" between mypage/#top makes all the difference.
>
> * this will reload the page, and go to the 
> anchor.http://127.0.0.1:8000/myproj/mypage#top
>
> *this will just jump to the  anchor...http://127.0.0.1:8000/myproj/mypage/#top
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to