Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Disabling links

  1. #1
    New to the CF scene
    Join Date
    Jan 2009
    Location
    UK
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disabling links

    I'm doing a website that has a basic JavaScript menu, my question is how to disable the link for the page you are on with it out disappearing. Can it be down in the CSS or in the javascript file?

    Here's the code
    Code:
    	<div id"menua" style="top: 5; left: 5; visibablitly: visable; position: absloute; z-index: 5;">
    
    	<p class=SWITCH>
    		<a href="http://geocities.com/nicola.cowan87/home.html"
    		   onMouseOver="Highlight (0)"
    		   onMouseOut="UnHighlight (0) ">Home</a>
    		<a href="http://geocities.com/nicola.cowan87/heathly-eating.html"
    		   onMouseOver="Highlight (1)"
    		   onMouseOut="UnHighlight (1) ">Healthy Eating</a>
    		<a href="http://geocities.com/nicola.cowan87/cooking.html" onclick="return false" 
    		   onMouseOver="Highlight (2)"
    		   onMouseOut="UnHighlight (2) ">Cooking</a>
    		<a href="http://geocities.com/nicola.cowan87/futher-information.html"
    	           onMouseOver="Highlight (3)"
    		   onMouseOut="UnHighlight (3) ">Further Information</a>
    		<a href="http://geocities.com/nicola.cowan87/disclaimer.html"
    		   onMouseOver="Highlight (4)"
    		   onMouseOut="UnHighlight (4) ">Disclaimer</a>
    	 </div>
    Thanks for your help - if i have put it the wrong place mods please move it

  • #2
    Regular Coder
    Join Date
    Dec 2008
    Location
    Tannhäuser Gate
    Posts
    286
    Thanks
    7
    Thanked 58 Times in 57 Posts
    Add onlick="return false;" to the link, for example:
    Code:
    <a href="http://geocities.com/nicola.cowan87/disclaimer.html"
    onMouseOver="Highlight (4)" onMouseOut="UnHighlight (4) "
    onclick="return false;" >Disclaimer</a>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •