problem while handling text area with javascript
<p>the script is not working:
please find the reason n remedy?</p>

<pre><code>function validate() {
        if(document.complain.complain.value == '' || document.complain.complain_subject.value == ''){
            alert("Hey! you can't left a field blank!");
            return false;
        }
 else if(document.complain.complain.length &gt;100) {

            alert("Sorry!post the complain within 100 characters");
            return false;
            }

        else{
            return true;
        }

    }
</code></pre>

<p>the form is:</p>

<pre><code>&lt;form name="complain" method="POST" action="complains.jsp" onsubmit="return validate();"&gt;
&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;input type="text" name="complain_subject"
            value="Complain Subject here" maxlength="30"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;textarea rows="6" name="complain" cols="73"
            value="Complain body here" maxlength="100"&gt;&lt;/textarea&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;input type="submit" value="complain" name="operation"&gt;&lt;input
            type="reset" value="Reset" name="B2"&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
</code></pre>
