J
Julia Briggs
Hello, I've developed this neat text remaining counter that's works
fine in NS & IE, except in NS7 for some reason when I apply the style
to the form box, it leaves artifacts behind when the user clicks
between form boxes. Can someone see why this is happening and what
tweaks I could apply to correct?
Julia
<script type="text/javascript">
function showRemaining(formElement) {
var theForm1 = formElement.form;
var remainingDisplay = formElement.name + 'Remaining';
theForm1.elements[remainingDisplay].value = formElement.maxLength
-
formElement.value.length;
}
</script>
<script>
function refreshfields()
{
showRemaining(document.forms['enrollment'].elements['signup_companyname']);showRemaining(document.forms['enrollment'].elements['signup_address']);
}
</script>
<style>
..box {
border-color: black; border: 1px solid #000000;background: #FFFFFF;
}
</style>
<FORM METHOD="post" NAME="enrollment" ACTION="some action">
<input name="signup_companyname" type="text" size="41" maxlength="60"
class="box" onkeyup="showRemaining(this);"><input readonly type=text
name="signup_companynameRemaining" size="1">
<br>
<input name="signup_address" type="text" size="41" maxlength="60"
class="box" onkeyup="showRemaining(this);"><input readonly type=text
name="signup_addressRemaining" size="1">
</FORM>
<script> refreshfields(); </script>
fine in NS & IE, except in NS7 for some reason when I apply the style
to the form box, it leaves artifacts behind when the user clicks
between form boxes. Can someone see why this is happening and what
tweaks I could apply to correct?
Julia
<script type="text/javascript">
function showRemaining(formElement) {
var theForm1 = formElement.form;
var remainingDisplay = formElement.name + 'Remaining';
theForm1.elements[remainingDisplay].value = formElement.maxLength
-
formElement.value.length;
}
</script>
<script>
function refreshfields()
{
showRemaining(document.forms['enrollment'].elements['signup_companyname']);showRemaining(document.forms['enrollment'].elements['signup_address']);
}
</script>
<style>
..box {
border-color: black; border: 1px solid #000000;background: #FFFFFF;
}
</style>
<FORM METHOD="post" NAME="enrollment" ACTION="some action">
<input name="signup_companyname" type="text" size="41" maxlength="60"
class="box" onkeyup="showRemaining(this);"><input readonly type=text
name="signup_companynameRemaining" size="1">
<br>
<input name="signup_address" type="text" size="41" maxlength="60"
class="box" onkeyup="showRemaining(this);"><input readonly type=text
name="signup_addressRemaining" size="1">
</FORM>
<script> refreshfields(); </script>