Soldier Bob
07-29-2002, 04:40 PM
I already use
onfocus="this.blur();" to make the fields I dont want enterable non usable. But I would like to make the text on the form that has to deal with this also "gray" instead of black.
Is there a way to change a CSS .class and have the changes automatically update with NS 4.77+ ?
I am triggering off of a radio button currently to make parts of the form selectable and other parts non selectable.
ex. ( I cobbled this together from the real form )
<html>
<head>
<title>test this</title>
<script>
function check_form_type(the_field) {
//Check the form radio button
if (document.frmTest.rdoFormType[1].checked) {
the_field.blur();
}
}
function clear_fields() {
document.frmTest.Person.value = "";
}
</script>
</head>
<body>
<form method="POST" name="frmTest" action="" onsubmit="alert('Data validation ran');">
<table width="600">
<tr>
<td colspan="2" width="600" class="bold" valign="top">Please select from the following Request Types</td>
</tr>
<tr>
<td class="TD8" width="275" valign="top"><input type="radio" name="rdoFormType" value="normal_pay" checked>Pay</td>
<td class="TD8" width="275" valign="top"><input type="radio" name="rdoFormType" value="collect_refund" onclick="clear_fields();">Collect or Refund Only</td>
</tr>
<tr>
<td><p align="right">Office Number </p></td>
<td class="bold" width="265" colspan="2"><input type="text" name="Office" size="4" maxlength="4"></td>
</tr>
<tr>
<td><p align="right">Employee id</p></td>
<td class="bold" width="265" colspan="2"><input type="text" name="Person" size="8" maxlength="8" onfocus="check_form_type(this);"></td>
</tr>
<tr>
<td colspan="2">In entering the employee number make sure to not use dashes '-'</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Submit" name="B1"> <input type="reset" value="Reset" name="B2"></td>
</tr>
</table>
</form>
</body>
</html>
what I am looking at doing would be to gray out the Employee id text and also the description below it In entering the employee number make sure to not use dashes '-'
and it would have to work in NS 4.7x
any ideas?
-S Bob
onfocus="this.blur();" to make the fields I dont want enterable non usable. But I would like to make the text on the form that has to deal with this also "gray" instead of black.
Is there a way to change a CSS .class and have the changes automatically update with NS 4.77+ ?
I am triggering off of a radio button currently to make parts of the form selectable and other parts non selectable.
ex. ( I cobbled this together from the real form )
<html>
<head>
<title>test this</title>
<script>
function check_form_type(the_field) {
//Check the form radio button
if (document.frmTest.rdoFormType[1].checked) {
the_field.blur();
}
}
function clear_fields() {
document.frmTest.Person.value = "";
}
</script>
</head>
<body>
<form method="POST" name="frmTest" action="" onsubmit="alert('Data validation ran');">
<table width="600">
<tr>
<td colspan="2" width="600" class="bold" valign="top">Please select from the following Request Types</td>
</tr>
<tr>
<td class="TD8" width="275" valign="top"><input type="radio" name="rdoFormType" value="normal_pay" checked>Pay</td>
<td class="TD8" width="275" valign="top"><input type="radio" name="rdoFormType" value="collect_refund" onclick="clear_fields();">Collect or Refund Only</td>
</tr>
<tr>
<td><p align="right">Office Number </p></td>
<td class="bold" width="265" colspan="2"><input type="text" name="Office" size="4" maxlength="4"></td>
</tr>
<tr>
<td><p align="right">Employee id</p></td>
<td class="bold" width="265" colspan="2"><input type="text" name="Person" size="8" maxlength="8" onfocus="check_form_type(this);"></td>
</tr>
<tr>
<td colspan="2">In entering the employee number make sure to not use dashes '-'</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Submit" name="B1"> <input type="reset" value="Reset" name="B2"></td>
</tr>
</table>
</form>
</body>
</html>
what I am looking at doing would be to gray out the Employee id text and also the description below it In entering the employee number make sure to not use dashes '-'
and it would have to work in NS 4.7x
any ideas?
-S Bob