Forum Moderators: open
function showcontime(){
if (document.frm.phone.checked){
document.frm.ConTimes.disabled=false&&
document.frm.ConTimes.className=input;
}
else{
document.frm.ConTimes.disabled=true;
}
}
that will change it to disabled but it won't change the style.
Fairly new to javascript by the way!
Thanks in advance!
function unlockbox(){
if (document.form1.checkboxname.checked){
document.form1.lockedboxname.disabled=false;
document.form1.lockedboxname.className='input';
}
else{
document.form1.lockedboxname.disabled=true;
document.form1.lockedboxname.className='disabled';
}
}
in the head.
then in the body, we have:-
<form name="frm" method="post">
<input type="checkbox" name="checkboxname" onClick="unlockbox()" />
<input disabled name="lockedboxname" type="text" class="disabled" />