Double link via anchor

I have this on the right sidebar

<a class="ad" href="#Logo">

<img src="An Image" width="125" height="125"  alt="" /></a>

and this at the bottom of the central column

<div class="ad">

 <a name="Logo" href="/MyFolder/MySubfolder/MyFile.php" target="_blank" rel="nofollow"><img src="An Image" width="125" height="125"  alt="" /></a>

</div><!-- close ad -->

the idea, it is possible with html (and css) is to link directly to the exterior link via /MyFolder/MySubfolder/MyFile.php when I click on the top image. At the moment all I managed to do is to move from one image to the the other.

I have this working with jsscript but am looking for alternative with html/css, WITHOUT having to repeat the link url.
What can I do, please?

Not sure that I understand the question. You have two images and you want both images to use the MyFile.php to know where each link should go?

Hi molona

I have two images that link to outside urls. via a redirect folder.they work fine with js script.

i would like to try AGAIN to do it with html css

At the moment if you click on the sidebar image you are sent directly to the outside url via an anchor in the other image link, controlled with a little script.

Let’s say that I want both image links to open your website, with more or less the code that I placed above.

Why don’t you simply use the href attribute to directly go to wherever you want to go?

Or , if you want to do it more dynamic (programmatically), you can point to the MyFile.php and then choose where each link should go (although your js is more practial for this because it takes some work from the server)

I’ll probably end up doing that, but I am trying to avoid repeating the same url, even if it is redirected

The two links go to the same external url…

Why?

Basically, you’re offuscating the url from the user. I don’t think this is a good practice. Only very exceptionally I trust a site that offuscates the url… and only for very good reasons.

If I can’t see where the link goes, I don’t trust it and I won’t follow it. So I think that it is still better that you use the href attribute the way it was intended to be used :wink:

5 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.