cyprus106
Programmer
- Apr 30, 2001
- 654
Is it possible to disable an edit box and the submit button associated with it in a form? If so how do you do it? and can it just be toggled on and off?
Thanks!
Cyprus
Thanks!
Cyprus
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<head>
<script>
function doToggle(){
document.all.wax.disabled = !document.all.wax.disabled;
if(document.all.wax.disabled){
document.all.toggle.value = 'Wax On';
}
else{
document.all.toggle.value = 'Wax Off';
}
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<input name="wax" value="Wax" type="text" disabled="true">
<input name="toggle" type="button" value="Wax On" onClick="doToggle()">
</form>
</body>
</html>