Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable a Link

 
preethi venkatarangan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
I have a href link which is an image & when you click on the image it opens a new browser.now how do i disable &gray out the link after it is clicked once so that it doesnt open a new window/browser again.
[CODE] <a href="javascript:clickLink();"><img align="middle" src="online.gif" border="0"></a>
function clickLink()
{
document.logon.submit();
Thanks
Preethi}
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
clickLink();this.href='javascript:void(0);'

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic