Jump to content

Make image link disappear when clicked


Nodral

Recommended Posts

HI

 

I have an image which is a link to open a file in excel.  What I want to happen is once the user has clicked the image once and the excel file has opened, the image to disappear of the page.  I've tried but can't seem to sort it. 

 

<script language="javascript" tyep="text/javascript">
  
  function hide() {
  document.getElementById(download).style.visibility  = "hidden";
  }

  
  </script>
</HEAD>

<BODY>
  
</BODY>
</HTML>

<!-- create form for input -->

<style language="text/css">
td{
text-align:center;
border:solid black 1px;
}
img{
text-decoration:none;
border-style:none;
}

#form{
visibility:hidden;
}


</style>
<div id="download">
<a href='download.php' target='new' onClick="hide()"><img src='button.png'></a>. 
</div>

 

download.php simply opens an excel file from the server into excel rather than a IE window.

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/248632-make-image-link-disappear-when-clicked/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.