0

How change the source of an image?

asked 2006-04-19 09:53:43 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3693690

By: nobody

Hi,

Is it possible to change an image when I click over? For exemple,when I click on an image "+" it become "-"


thanks?

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2006-04-19 10:41:41 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3693752

By: oberinspector

as i believe you can change any attribute of a zul component by program:

<image id="img1" src="/img/sun.jpg" width="10px"/> ...
<zscript>
img1.setSrc("/img/new.jpg")
...



link publish delete flag offensive edit

answered 2006-04-19 14:31:15 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3694068

By: henrichen

<image id="img1" src="/img/plus.jpg" width="10px"> <attribute name="onClick"> img1.setSrc("/img/minus.jpg"); </attribute> </image>

Click on the image would trigger the onClick event handler and change the image src from plus.jpg to minus.jpg

/henri


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: 2006-04-19 09:53:43 +0800

Seen: 352 times

Last updated: Apr 19 '06

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