Forum Moderators: open

Message Too Old, No Replies

How to overrule a linking in HTML?

         

knutrn

12:41 pm on Dec 17, 2005 (gmt 0)

10+ Year Member



I am generating links with a script (PHP) where I would like to overrule certain links. I am not capable to sort the different links in the script, so was wondering whether there is a way to overrule og disable the links through a simple HTML-tag? In other words: the generated links appear as other links (manually created in the HTML) or as plain text.

tedster

12:33 am on Dec 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, knutrn.

There's no way I know of to override a link tag -- you need to remove the anchor tag and the closing anchor tag to leave the previous link text in a not-linked form. But since you apparently need to do this by hand (you said you can't sort them in the script, if I understand correctly) you should be able to do it with no problem by editing the page source.

encyclo

3:05 am on Dec 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



At a stretch, you could make the link unclickable for the end user, but it would require Javascript and CSS to be enabled (ie. the links would still be "live" for a bot):

<a href="page.html" [b]onclick="return false;" style="color:black;cursor:default;"[/b]>link</a>

A much better bet is to sort this out in the PHP code as tedster has suggested.