Hi:
        I would like to disable a submit button when user is entering a
text field by using tc:in? Could someone give me better direction?
Thanks.

For example:

<tc:script>
function disableButton()
{
        var submitBut = document.getElementById('submit');
        alert(submitBut = ' + submitBut);
        submitBut.disabled = true;
}
</tc:script>


<tc:cell spanX="4">
                        <tc:in focus="true" onchange="disableButton();"
value="#{Controller.title}"
                                readonly="#{Controller.readOnly}"
                                tip="title" >
                                <f:validateLength maximum="120" />
                        </tc:in>
                </tc:cell>



<tc:button action="#{Controller.submit}"
                                label="submit"
                                id=" submit" 
                                immediate="false">
                                <f:facet name="confirmation">
                                        <tc:out value="Are you sure to
submit?" />
                                </f:facet>
                        </tc:button>
--> Sam Wong

Reply via email to