Avatar of arthur_raft2
arthur_raft2
Flag for Australia asked on

Conditional Link URL - Easy Question

Take a look at the following script.
A small block of links that will apear on various different pages.

The logic should be fairly simple to follow.

I need the link target addresses to vary according to the page or content that contains these links.

This might be based on URL?
It could also be based on some identifier or class contained in the surrounding content

Simpler the better - i.e, cSS. Javascrip if necessary.

Any suggestions ?


<table  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><a href=" if current page = A, then link = B "><a href=" if current page = C, then link = D ">Text 1</a></a></td>
    <td><a href=" if current page = E, then link = F "><a href=" if current page = G, then link = H ">Text 2</a></a></td>
    <td><a href=" if current page = I, then link = J "><a href=" if current page = K, then link = L ">Text 2</a></a></td>
  </tr>
</table>
JavaScriptWeb DevelopmentCSS

Avatar of undefined
Last Comment
zephyr_hex (Megan)

8/22/2022 - Mon
Dr. Klahn

In Apache, nginx, or IIS?
ASKER CERTIFIED SOLUTION
zephyr_hex (Megan)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
zephyr_hex (Megan)

Did this answer your question?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23