Dave
|
| Posted: 05/14/2003, 9:14 AM |
|
I am sure I have seen an example of this, but for some reason I can't find it when I need it.
I would like to have some fields uneditable unless a checkbox/field has been updated for another item.
Can someone point me to an example?
For reference, if it makes any difference, I am using PHP with a Postgres back end.
Thanks
|
|
|
 |
Dave
|
| Posted: 05/19/2003, 12:05 PM |
|
OK, here is an example of what I would like to do:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT LANGUAGE=javascript>
<!--
function setField(objCheckField,strFieldNames){
var arrFieldList = strFieldNames.split(";")
var objFormField = ""
for(i=0;i<arrFieldList.length;i++){
objFormField = document.forms[0].elements[arrFieldList];
if (objCheckField.checked){
objFormField.disabled=false;
objFormField.style.backgroundColor = "white";
}else{
objFormField.disabled=true;
objFormField.style.backgroundColor = "silver";
}
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM action="" method=post id=form1 name=form1>
<INPUT type="checkbox" id=checkbox1 name=checkbox1 onClick = "setField(this,'text1;text2;text3;text4')"><br>
<INPUT id=text1 name=text1 style="BACKGROUND-COLOR: silver" disabled><br>
<INPUT id=text2 name=text2 style="BACKGROUND-COLOR: silver" disabled><br>
<INPUT id=text3 name=text3 style="BACKGROUND-COLOR: silver" disabled><br>
<INPUT id=text4 name=text4 style="BACKGROUND-COLOR: silver" disabled><br>
</FORM>
</BODY>
</HTML>
I have tried to put this into CCS, partial example using the same function as noted before.:
<td class="RockItDataTD"><input class="RockItInput" style="BACKGROUND-COLOR: silver" maxlength="5" size="8" value="{ver}" name="{ver_Name}" disabled></td>
I think I see the problem, in the fact that the "name" field has a {ver_Name} instead of an actual name. Does anyone know how I can work around this issue?
Thanks
Dave
|
|
|
 |
|