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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

enable/disable hyperlink

Status
Not open for further replies.

jamesmay

Technical User
Jun 1, 2004
41
GB
Hi, how can i disable or anable a hyper link from working by selecting a button on the screen?

I have a link below...

<a href="test.asp">test</a>

i want a button called "disable" to disable the hyper link when pressed and enable the hyperlink when reselected. can anyone help?

kindest thanks,

JM
 

Yeah, good thinking. Doesn't look like flawless XHTML will be much of a priority.
 
Sorry guys, im new to all this - should of been a bit clearer in what i was after, Dan - your repsonse was a perfect solution for my initial question but i was looking for a simpler solution. I have found on in the mean time which is showing / hiding columns when i click the button.
i just need to stop both colums apearing when i first open the page.

i call a function which toggles the display of the columns when selected also it runs the function on load but you see both columns for a second or so...


document.getElementById('A1').style.display="none";
document.getElementById('A2').style.display="none";
document.getElementById('A3').style.display="none";
document.getElementById('A4').style.display="none";
document.getElementById('A5').style.display="none";
document.getElementById('A6').style.display="none";
document.getElementById('A7').style.display="none";
document.getElementById('A8').style.display="none";
document.getElementById('A9').style.display="none";
document.getElementById('A10').style.display="none";
document.getElementById('B1').style.display="block";
document.getElementById('B2').style.display="block";
document.getElementById('B3').style.display="block";
document.getElementById('B4').style.display="block";
document.getElementById('B5').style.display="block";
document.getElementById('B6').style.display="block";
document.getElementById('B7').style.display="block";
document.getElementById('B8').style.display="block";
document.getElementById('B9').style.display="block";
document.getElementById('B10').style.display="block";
------ end of function


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1"><%=j%></font></div>
</td>
<td width="40%" height="20"><font size="-1"><%=Left((Recordset1.Fields.Item("C2").Value),20)%></font></td>

<td width="45%" height="20" id='<%= "A" & CStr(j)%>'><font size="-1"><a href="<%=z(j-1)%>" target="bottom" title="Defect Trend Report for <%=(Recordset1.Fields.Item("C3").Value)%>"><%=(Recordset1.Fields.Item("C3").Value)%></a></font></td>

<td width="45%" height="20" id='<%= "B" & CStr(j)%>'><font size="-1"><%=(Recordset1.Fields.Item("C3").Value)%></font></td>

<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000"><%=(Recordset1.Fields.Item("Defects").Value)%></font></div>
</td>
</tr>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top