vsaritha_9
asked on
Anchor Tag
Hi all,
Here is my problem.I want to Disable few links in my menu. I am using anchor tags. Is there any way to disable anchor tags so that i can enable them later.I have tried with disabled feature but it did not work..Is there any alternate solution for this.
Hope to see quick responses from you all.
Thanks a lot in advanced.
With regards
saritha
Here is my problem.I want to Disable few links in my menu. I am using anchor tags. Is there any way to disable anchor tags so that i can enable them later.I have tried with disabled feature but it did not work..Is there any alternate solution for this.
Hope to see quick responses from you all.
Thanks a lot in advanced.
With regards
saritha
or
<a nohref> . . . </a>
<a nohref> . . . </a>
you could use the onClick handler to return false ... this would have the effect of disabling the link:
<a href="whatever.html" onClick='return false;'>yourtext</a>
<a href="whatever.html" onClick='return false;'>yourtext</a>
... and you could set up a global variable to determine whether or not your links are disabled:
<SCRIPT language='javascript'>
var linksEnabled = true;
</script>
<a href="whatever.html" onClick='return linksEnabled;'>yourtext</a >
... set linksEnabled to false to disable the links.
<SCRIPT language='javascript'>
var linksEnabled = true;
</script>
<a href="whatever.html" onClick='return linksEnabled;'>yourtext</a
... set linksEnabled to false to disable the links.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
omg, svd2002 do you really believe that is
U S A B L E
???
and btw its better to use visibility than diplay.
U S A B L E
???
and btw its better to use visibility than diplay.
Even if it was usable, it would not be cross browser. Might even crash NS4.x
Cd&
Cd&
ASKER
Thanks a lot,
It was helpful for us
Saritha
It was helpful for us
Saritha
oh my god!
<a href="#">yourtext</a>
If it is something else you are trying to do please tell us what behaviour you want when it is "disabled".
Cd&