Revision history [back]

click to hide/show revision 1
initial version

answered 2010-02-10 02:55:45 +0800

zacy gravatar image zacy

H,aaloise this is my example i use event onChange u can change this event with onchanging event for u self. you can refer to www.w3scholls.com and search for JQUERY syntax

<textbox id="disableTextbox" focus="true">
        <attribute w:name="onChange">
        <![CDATA[
        var button = this.$f('button');
        var disableTextbox = this.$f('disableTextbox');
        if(disableTextbox.getValue().length == 5){
            button.setDisabled(false);
        }else{
            button.setDisabled(true);
        alert("please set value on textbox = 5 character to enable the button");
        }
        ]]>
    </attribute>
    </textbox>
<button label="click" disabled="true" id="button"/>

note : -) u must use xmlns:w="http://www.zkoss.org/2005/zk/client" for client side. i hope this example can fix u problem. thanks

zacy

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