Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making text act link a link (graphically at least)

Status
Not open for further replies.

MontyBurns

Programmer
Oct 3, 2001
99
GB
Hi

I've got a DHTML menu tree, and i'm trying not to use CSS classes to define it's style.

How do I get the top level elements to pick up the style rule for A and A:hover, when they aren't actually links?

Using <a href=&quot;javascript: void(0)&quot;> doesn't seem to work, so I wrote the following and called it from each top level link:

//do nothing
function doNothing (nothing)
{
//nothing
}

and call it with:
<a href=&quot;javascript: doNothing('nothing')>

Unfortunately this is misbehaving under some circumstances - and i'm sure there's a better way anyway.

Any suggestions would be appreciated,
Burns
 
try

<a href=&quot;#&quot; onClick=&quot;return false;&quot;>link</a>

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top