i was just working on some stuff and remembered how ive handled a problem
like this in the past.
the issue you have to wrestle w/ is the anchor tag will perform its normal
behavior after the onclick
handler has finished executing.  basically, onclick is just part of the
process for the anchor tag.
well, what ive done in the past is determined, its only a link if you think
its a link :)  so i just toss some
css on a span tag to make it look like a link, then you get full control
over the onclick behavior.

heres some sample css:

/* anchor imitator */
span.anchorImitator {
font-size: 11px;
font-family: Verdana,Arial,Helvetica,san-serif;
font-weight: 400;
color: #1505A5;
text-decoration: none;
}

span.anchorImitator:hover {
cursor:pointer;
font-size: 11px;
font-family: Verdana,Arial,Helvetica,san-serif;
font-weight: 400;
color: #AEF3F9;
text-decoration: underline;
}

of course it wont do much w/o javascript enabled.

-nathan

Reply via email to