Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jsf and javascript to disable a button

843844Feb 28 2008 — edited Feb 29 2008
Hi

is there a way to get the following code to disable the button called next
when the button "btn" is clicked i call the javascript function myFunc but it does not disable the button called "Next"
<html>
	<head>
		<title>Personal Info</title>
	</head>

	<body>
	<script type="text/javascript">
	function myFunc()
	{
		document.personalForm.Next.disabled=true;     
	}
	</script>
		<f:view>
			<h:form id="personalForm">
			
			<h:commandButton id="Next" value="Next" action="doSomething" />
			<h:commandButton id="btn" value="button" immediate="true" onclick="myFunc()"  />
			
			</h:form>
		</f:view>
	</body>
</html>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2008
Added on Feb 28 2008
1 comment
351 views