Weird problem with simple HREF link - html

I'm putting a simple href link inside my html page:
http://search.mastertour.co.il/?mode=page&page=12077&lang=rus
the link can be found at the bottom of the page near the cleopatra head image.
Now, while the page is in a subdomain, the link referes to a TLD but the page cannot redirect to the link. It shows a "half-baked" page while trying to access the link directly (not through the html link) shows the page fine.
Any idea???

Get rid of the window.open(), this is all you need:
здесь

I'm guessing it has something to do with the onclick attribute you have attached. Do you really need it? Also, i'm guessing you're using it to force that link to open in a new tab/window - you really shouldn't, as the user should have that kind of control.

Related

Why my anchor link from a secoundary page is not working?

I have the following problem with one of my current projects.
I would like to achieve that when you click on a link which is on a secondarly page, it sends you to the home page but, not at the top of the homepage (by default), I would like that it sends you where a specific ID is.
At the moment I have the following URL in this special link but it doesn't work
link
I have tried different ways I saw in this community but I didn't have luck. At the moment when you click it send you to the homepage but at the top and my ID is almost at the end of the page
How can I fix it please?
Thanks
Kindly use below code on page load. make sure you call this once DOM is loaded. This will scroll the page to this anchor.
location.hash = "#contact-anchor";

Identical anchor ids on two pages: How to link from one page to the anchor on the other page

I have two websites page1 and page2. On every page there is a download form which I can access through the anchor id #DownloadForm.
On page1 I'd like to create a link to the download form on page2. I thought this would work:
But when clicking on this link (in Chrome) it takes me to the download form on page1. As if the anchor expression was evaluated first and then the rest of the href is ignored.
Btw: I'm using Wordpress but I guess that's not relevant here.
If anyone has a hint for me, I'd highly appreciate!
Have you tried the full page uri? I tried this and it worked for me in chrome and firefox.

Tag appears to be interpreted as part of a link and thus breaking the link

We have a link on our home page going to a subdomain like so:
dogs.example.com?_ga=1.231775647.1813887044.1412445362
But this produces a 404 error "Cannot find page "_ga=1.231775647.1813887044.1412445362".
If I remove the tag and just navigate to dogs.example.com the page does load. So for some reason the browser is interpreting the tag as part of the link.
Is there a way to prevent that from happening?
You are producing a relative link, not an full http link which you need to change domains try the following:
href="//dogs.example.com?_ga=1.231775647.1813887044.1412445362"

Anchor with hash in href attribute is opening a new page

I have never seen this behavior. I have a simple hash link on a website. The link looks like this:
<a href='#view_123'>Click</a>
On my test server, when I click, it simply changes the url to
http://www.myserver.com/mypage.aspx#view_123
And the page does not redirect anywhere. However, when I push this same link to my live server, it causes the browser to redirect to:
http://www.myserver.com/www.myserver.com#view_123
This makes no sense to me. The only way around this is to put the full url of the page in the href with the hash appended to the end, but this is causing me other problems and is not what I want to do.
The only clue I've come across is the MIME type, but I'm pretty sure mine is correct as "text/html".
There is no javascript causing this. I can hover over the link, and the url hint in Chrome shows the incorrect url.
Have you tried changing the target tag?
<a href='#view_123' target='_self'>Click</a>
or
<a href='#view_123' target='_top'>Click</a>

How to link to the kth link on another web page in simple html?

My goal is to have a link on my web-page that always seamlessly redirects you to the top link on the front page of reddit.com when you click it. So you would presumably be able to click the link on my page and it would maybe search the html of reddit's front page, find the link at the very top, and automatically redirect you to that. Any ideas on how to do this? It's kind of weird-- like a link to a link...
You cannot do this with pure HTML. You will need either Javascript or server-side code, in which you retrieve the source of Reddit's homepage, parse it to pick out the link you want, and use its href attribute's value as the href value for your own link.