So im new with javascript and found this one to solve my problem:
Change image source with javascript
But the example does not work for me.
<script type="text/javascript">
function changeImage(a) {
document.getElementById("img1").src=a;
}
</script>
And
<table align=left width="896px" class="tableCategories">
<tr class="trCategories">
<td class="tdCategories">
<img id="img1" src="./icon/menu/Essen3.png" onclick='changeImage(Shopping3.png);'/>
</td>
</tr>
</table>
So if i click on the image it does not change itself. The path to the images are correct. What am i doing wrong?