Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4021188
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:19:15+00:00 2026-05-20T10:19:15+00:00

please, is there a way how to achieve this ? static image with url

  • 0

please, is there a way how to achieve this ?

  1. static image with url defined in HTML relatively to the html page
  2. adding the AJAX link to it to make some AJAX action

1st I had this:

<wicket:link>
    <img src="images/test.jpg">
</wicket:link>

-> image is found and displayed, the url was automatically resolved to :

<img src="resources/my.package.MyClass/images/test.jpg" >

2nd I added the AJAX action:

<wicket:link>
    <img src="images/test.jpg" wicket:id="sayHelloImage">
</wicket:link>

add(new AjaxLink("sayHelloImage") {

    public void onClick(AjaxRequestTarget target) {             
        target.appendJavascript("alert('Hello!')");
    }
});

-> the result is that the action works, but the image url is no longer resolved, image is not found, the url stayed the same:
img src=”images/test.jpg” …

I know that I can load the image dynamically from the class like this:
ResourceReference image = new ResourceReference(MyClass.class,”images/test.jpg”);
but this is what I don’t want to, I would prefer to set the image url in html.

Thank you,
with kind regards,

-josef-

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:19:15+00:00Added an answer on May 20, 2026 at 10:19 am

    <img> can’t be used to produce a link (AjaxLink).

    Try this:

    <a wicket:id="sayHelloImage">
        <wicket:link>
            <img src="images/test.jpg">
        </wicket:link>
    </a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If there is more than one way, please list them. I only know of
Please let me know why there is lot of white space below the page
Is there a coding standard for HTML? Please suggest links that have the coding
This is a very trivial problem for you guys. Please suggest me the way
Is there a way to include a javascript-loaded advertisement last on the page, but
Could you please tell me if there is any equivalent of Access' DISTINCTROW for
Can anyone please tell me is there any special requirement to use either EXTERN
Can anyone please advise me if there will be any problems changing the wordpress
Is there a parser/library for css stylus available for php? If not please suggest
**EDIT: There are several options below that would work. Please vote/comment according to your

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.