I'm trying to create some navigation buttons with images (that swap to another image when the images is clicked - ie changes to active state). I want to be able to control these using PHP.
All the examples I have seen seem to use text rather than images for this.
So is the correct way to do it with Javascript with something like:
<td><a href="#" target="_top" onClick="MM_nbGroup('down','group1','news2','images/news.jpg',1)" onMouseOver="MM_nbGroup('over','news2','images/news2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="news2" src="images/news.jpg" border="0" alt="news" onLoad=""></a></td>
And insert (somewhere with the other PHP):
<?php if(isset($_GET['news'])){ echo 'class="active"';}?>
Any help would be greatly appreciated, I have not used PHP before and my CSS is pretty poor too.
Thanks