Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: how do you enable/disable a form button


Message #1 by "nick" <nick@i...> on Mon, 1 Oct 2001 10:59:55
I'm not sure how to check if the user has visited the page before (I you
want to use cookies, parameter in the QueryString or something similar).

But to enable/disable a button, you can write code like this (IE only,
version 4 and up):


changeButtonState(true) to disable it, changeButtonState(false) to enable
it.


<script language="JavaScript" type="text/javascript">
	function changeButtonState(bDisable){
		document.all.forwardInput.disabled = bDisable;	
	}
</script>

<body>

	<form>
		<input type="button" id="forwardInput">
	</form>

</body>




/Robert



-----Original Message-----
From: nick [mailto:nick@i...] 
Sent: den 1 oktober 2001 13:17
To: javascript
Subject: [javascript] RE: how do you enable/disable a form button


How would i go about enabling /disabling a forward navigation button then?

  Return to Index