Need help with this script!!!!

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,089
Latest member
Ketologenic

Latest Threads

Top