Nodral Posted October 7, 2011 Share Posted October 7, 2011 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? Quote Link to comment https://forums.phpfreaks.com/topic/248632-make-image-link-disappear-when-clicked/ Share on other sites More sharing options...
Nodral Posted October 7, 2011 Author Share Posted October 7, 2011 Sorted it. I'd missed out my speech marks on the element id Cheers Quote Link to comment https://forums.phpfreaks.com/topic/248632-make-image-link-disappear-when-clicked/#findComment-1276870 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.