[thelist] onKeyDown (Press)(Up) Not Working in NN 4.7

Gregory.John.Toland at census.gov Gregory.John.Toland at census.gov
Fri Sep 1 08:38:13 CDT 2000


I have several TEXTAREA tags on the form.  Each tag has:
     onKeyUp="TextCounter(this.form.MyField1, this.form.MyField2, 300);"
      onKeyDown="TextCounter(this.form.MyField1, this.form.MyField2, 300);"

Each first and second parameter are different for each TEXTAREA tag.  That is,
another TEXTAREA tag might have:
     onKeyUp="TextCounter(this.form.MyField3, this.form.MyField4, 300);"
      onKeyDown="TextCounter(this.form.MyField5, this.form.MyField6, 300);"

According to your suggested URL below it says to write something like:
     document.onkeydown= "function";

How do I pass in parameters to the function for the different TEXTAREA tags.

Also, look at http://javascript.internet.com/forms/limit-textarea.html.  The
events seem to work no problem on WinNTW SP6A under NN 4.7.  Why does that work,
but mine won't?  It is basically the same code.

Here is my code:
   <form action="CheckListAdd.asp" enctype="application/x-www-form-urlencoded"
         method="post" name="frmAddCheckList"
         onSubmit="return ValidateDate(this)">
      <input id="dtDocDate" name="dtDocDate" type="hidden">
      <table class="EvalForms" border="0" cellpadding="3"
             cellspacing="0">
         <tbody>
            <tr>
               <td class="EvalFormsHeader" colspan="4">
                  American Community Survey - Research and Evaluation Checklist
               </td>
            </tr>
            <tr>
               <td class="EvalFormsBody" colspan="4">
                  Description of Methodology:   (Maximum 300 characters)
               </td>
            </tr>
            <tr>
               <td class="EvalFormsBody" colspan="3">
                  <textarea cols="50" id="memDesMeth" name="memDesMeth"
                            rows="6" tabIndex="8"
                            title="Description of Methodology"
                            onKeyDown="TextAreaCounter( this.form.memDesMeth,
                                       this.form.intDesMethLen, 300 );"
                            onKeyUp="TextAreaCounter( this.form.memDesMeth,
                                     this.form.intDesMethLen, 300 );"
                                     wrap="virtual"></textarea>
               </td>
               <td class="EvalFormsBody">
                  <img alt=" " height="1" src="../../Img/Spacer.gif"
                       width="10">
                  Remaining Characters:<br>
                  <img alt=" " height="1" src="../../Img/Spacer.gif"
                       width="10">
                  <input id="intDesMethLen" maxlength="3"
                         name="intDesMethLen" readonly
                         size="3" type="text" value="300">
               </td>
            </tr>
         </tbody>
      </table>
   </form>

Greg

>>I am using (Testing) NN 4.7 and I cannot get the onKeyPress, onKeyDown, or
>>onKeyUp events to fire off.  The onChange event works with no problem.  Any
>>ideas?

>1) They don't work at all on Linux
>2) They only work on the whole page on Windows and Mac, not just on a
>textarea. For more info, see

>http://www.xs4all.nl/~ppk/js/

>under Events => Netscape 4

>ppk






More information about the thelist mailing list