Chants - Deaf World - iPhone Store - Debt Consolidation - Free Music Download

PDA

View Full Version : Disabling a link


enchance
Oct 8th 2007, 6:14 pm
How do I disable a text link using javascript? Or even just to delete the "href" of the text link so the cursor won't change to the hand icon when someone rolls over it.

kkrizka
Oct 8th 2007, 6:22 pm
Do you just want to prevent the cursor from changing or get rid of the link altogether?

If it's the former, you might want to give CSS' cursor a try.
http://www.w3schools.com/css/pr_class_cursor.asp

enchance
Oct 8th 2007, 6:27 pm
I want to get rid of the link entirely. I'm making a simple "prev/next" set of links for my portfolio. I'm attaching it to php which will call the js to disable the "next" link once it gets to the end of the portfolio, and the "prev" link if it's the first one.

I think what I'm looking for is a way to delete the <a></a> tag...am I right?

enchance
Oct 8th 2007, 7:04 pm
I got it! Since I'm using php,I can just rewrite the links only this time without the <a></a> tags. hehe