disabling a a href link

K

Kavi

i have created a simple site

it lists links which calls a javavscript function

<a href="javascript:Convert();">Convert</a>

is it possible possible to disable a link after is has been selected,
but this i mean, not make it clickable :)
 
J

Jonathan N. Little

Kavi said:
i have created a simple site

it lists links which calls a javavscript function

<a href="javascript:Convert();">Convert</a>

is it possible possible to disable a link after is has been selected,
but this i mean, not make it clickable :)
Yes, but don't use pseudo-protocol "javascript:" in HREF attributes.

<a href="{some real URL}" onclick="return myFunct()">...


function myFunct(){
if(someCondition==true){
return true; //link will be followed
}
else {
return false; // link will NOT be followed
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top