robert_gsfame Posted April 16, 2010 Share Posted April 16, 2010 <?php if($text=="aaa"){echo "<a href=# onmouseover=changepic() onmouseout=changepic2()>";}else{};?><?php if($text=="aaa"){echo "<img src=bar/column.gif border=0 id=column/><img src=bar/column1.gif border=0 id=column1 style='display:none'/>";}else{echo "<img src=bar/column1.gif border=0 id=column1/>";}?><?php if($text=="aaa"){echo "</a>";}?> and javascript code <script type="text/javascript"> function changepic(){ document.getElementById('column').style.display="none" document.getElementById('column1').style.display="" } </script> <script type="text/javascript"> function changepic2(){ document.getElementById('column1').style.display="none" document.getElementById('column').style.display="" } </script> why wont the image hover????can anyone help me Thx Quote Link to comment https://forums.phpfreaks.com/topic/198729-why-not-hover/ Share on other sites More sharing options...
yozyk Posted April 16, 2010 Share Posted April 16, 2010 1. Use commas for html attributes. 2. You may do it by CSS (without javascript). a:hover{background-image: url(bar/column1.gif)} Quote Link to comment https://forums.phpfreaks.com/topic/198729-why-not-hover/#findComment-1042965 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.