how to disable a main link.

Hello sir’s,

Can anyone tell me how can i disable the main link on my navigation.
i have manage to use onclick=javascript:return false; on the sub link but on the main link i’am lost…
Can any one suggest how can i manage this one.
Thanks very much.

this is my code for my navigation

<ul class='menu' id='menu' name='menu'>
<li><a href='createticket.php'  target='body'>Create Ticket</a></li>
//main link with sublink
<li><a href='#' onclick="javascript:return false;">User Maintenance</a><ul><li ><a href='Users.php' target='body'>View User</a></li><li><a href='Viewuser.php' target='body'>Edit User</a></li><li><a href='passchange.php' target='body'>Reset Password</a></li></ul>
</li>
<li><a href='Dept.php' target='body'>Department</a></li>
<li ><a href='Cat.php' target='body'>Category</a></li>
<li><a href='subcat.php' target='body'>Sub-Category</a></li>
//main link with sublink
<li><a href='#'>Ticket Options</a><ul><li><a href='AssignTicket.php' target='body'>Assigned Ticket</a></li><li><a href='UnAssignticket.php' target='body'>Pending Ticket</a></li><li><a href='ClosedTicket.php' target='body'>Closed Ticket</a></li></ul></li>
<li><a href='tickethistory.php' target='body'>Ticket History</a></li><br/><li><a  href='logout.php' target='_parent'>LOG OUT</a></li>
</ul>

There’s about 10 links there. Which are you talking about?

With JavaScript, returning false on the natural event of an element (click for an anchor, submission of a form, etc.) you return false from the event in order to prevent the default.

Sponsor our Newsletter | Privacy Policy | Terms of Service