I'm trying to use an image for a link like so:
<wicket:link>
    <a href="UploadPage.html">
        <img src="/logo.png"/>
    </a>
</wicket:link>
In the rendered HTML, the href of the <a> is correctly set to my upload page.
But curiously, Wicket adds onclick=window.location.href='/logo.png' to the <img> tag. The end result is that clicking on the logo loads the logo itself, rather than the upload page.
A simple work-around is to not use <wicket:link>, and hard-code the url to my upload page, but I'd like to know if there is a proper solution to this.
For me it helped to add empty onClick (Wicket 1.5):
<li><a class="current" href="main">
   <img onClick="" src="img/icons/home.png"/>
</a></li>
after this, the link points to the page, not the image itself
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With