i have a hyperlink code like : Click Here and i want to customize this link on the basis of my radio button click,which are like : YES NO on radio-button value:'yes',i want to enable the hyperlink. while on radio-button value:'no',i want to disable the hyperlink. So,to make the hyperlink disable after clicking radio-button 'NO', i have written the following in disable-link() method : function disable-link() { //document.getElementById('disable-link').disabled=true; document.getElementById('disable-link').href = '#'; } Now,what i have to write in enable-link() method so that the hyperlink gets re-enabled after clicking radio-button 'YES'
function enable-link()
{
//document.getElementById('disable-link').disabled=false;
// SOME LINE OF CODE TO RE-ENABLE THE LINK
}
document.getElementById('disable-link').disabled=true*/*false; -: it makes the disable but user is able to click on the hyperlink though.So, i have used "document.getElementById('disable-link').href = '#';" -: it makes the link unclickable too Please suggest.