-
FEATURED COMPONENTS
First time here? Check out the FAQ!
How can I make a button change its image by clicking on the same button?
<zk>
<window >
<button id="boton" image="/imagen/likecora.png" label="change color" onClick='Clients.evalJavaScript("cambiar()")' >
<attribute name="onClick"><![CDATA[ boton.setImageContent("/imagen/likerojo.png");]]>
</attribute>
</button>
</window>
</zk>
I don't know if you saw it, but you set the image
attribute in the button and try to adapt the imageContent
attribute with your javascript.
Just make boton.setImageContent(
to boton.setImage(
Chill.
Asked: 2018-04-09 10:02:44 +0800
Seen: 9 times
Last updated: Apr 10 '18
[Announcement] ZK 8.5.1 is now available!
Highlight new release changes/new features in demo app
Problems calling function 'sec:isAnyGranted' with zkspring 3.2 and Spring Security 4
webapp folder of ZK spring boot?
Can I set in runtime a new value to library property: org.zkoss.zk.ui.processMask.enabled:
Package ZK Eclipse Tomcat Project For Deployment
AImage org.zkoss.zk.ui.UiException: java.io.FileNotFoundException