Reply to Re: How to disable link to current page?

Your name:

Reply:


Posted by boclair on 04/07/07 00:21

H@C0 wrote:
> Hi,
> Is it possible to use javascript to detect the current page and disable the
> link?
> Does anybody know a method to disable the link to the current loaded page or
> a website with an example?
>
> Regards, Hans

Having javascript anywhere near navigation is fraught. There are a
number php methods to not display the hyperlink to current page.

An example

<?php
$thisfile=(basename ($_SERVER['PHP_SELF']));

if ($thisfile=="page1.php")
{$page1="style='display:none;'";}
else {$page1="";}

if ($thisfile=="page2.php")
{$page2="style='display:none;'";}
else {$page2="";}
?>
______markup_____
<a href="page1.php" <?=$page1;?>>Page 1</a>
<a href="page2.php" <?=$page2;?>>Page 2</a>

Louise

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация