html - Anchor with hash in href attribute is opening a new page -


I've never seen this behavior. I have a simple hash link on the website that looks like this:

  & lt; A href = '# view_123' & gt; Click & lt; / A & gt;  

On my test server, when I click, this URL should only be

  http://www.myserver.com/mypage.aspx# 23]  

and the page does not redirect anywhere. However, when I put this same link on my live server, the browser causes it to redirect:

  http://www.myserver.com/www.myserver.com#view_123  

It does not make sense to me the only one around it The way that the page in the href Areas to be added to hash attached to the end of the URL, but am I going to cause other problems and it's not what I wanted.

I have found the clue only the mime type, but I'm pretty sure that "right to text / html" is

for this reason there is no JavaScript I can hover over, and the URL signals in Chrome show the wrong URL.

Have you tried changing the target tag?

  & lt; A href = '# view_123' target = '_ self' & gt; Click & lt; / A & gt;  

or

  & lt; A href = '# view_123' target = '_ head' & gt; Click & lt; / A & gt;  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -