0

Add Image

asked 2010-02-26 02:51:17 +0800

gogsone gravatar image gogsone
30

Hi,

I can't seem to understand how to add image to some component.

I'm using: <button id="ok" label="OK" image="/img/image1.gif">

No matter to which folder i add img folder i cant display an image. I tried all possible folders in project from Java Resources up to WebContent.
The path was allways correct, but still no result.

Thanks

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-02-26 03:03:29 +0800

PeterKuo gravatar image PeterKuo
481 2

I tried following line in zk live demo
http://www.zkoss.org/zkdemo/userguide/
<button id="ok" label="OK" image="/img/Centigrade-Widget-Icons/Globe-128x128.png" />

It works.

Maybe your project haven't sync the resource?
You may clean and rebuild your project first.

link publish delete flag offensive edit

answered 2010-02-26 03:10:11 +0800

smigol gravatar image smigol flag of Italy
316 2

hi @gogsone
if u use Eclipse, u have to imagine the first / as the folder WebContent ... so, if I look at your example above, i think that ur project is like:
Project Name/WebContent/img/image1.gif

regards

link publish delete flag offensive edit

answered 2010-02-26 03:28:45 +0800

gogsone gravatar image gogsone
30

Yes smigol, it's working now.

Thanks to both of you.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-02-26 02:51:17 +0800

Seen: 369 times

Last updated: Feb 26 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More