myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wong, Emmanuel \(Sam\)" <Wo...@SEC.GOV>
Subject [Tobago] How to make button disable when user inputing a text field by using tc:in?
Date Tue, 24 Apr 2007 16:25:12 GMT
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


Mime
View raw message