<script type="text/javascript" language="javascript">
function checkempty()
{
if(document.getElementById("title").value=="")
{
alert("Please enter title.");
document.getElementById("title").focus();
return false;
}
if((document.getElementById("word_count").value>"3000") || (document.getElementById("word_count").value<"400"))
{
alert("Please enter less than 3000 or more than 400 words.");
document.getElementById("word_count").focus();
return false;
}
return true;
}
</script>
<form method="post" action="" name="my_form" id="theForm" onSubmit="return checkempty();">
<input size="80" id="title" type="text" name="title" value="" />
<textarea id="word_count" name="word_count"></textarea>
<input type="submit" name="ok" value="submit" />
/*********this script is not working in the above code **************/
if((document.getElementById("word_count").value>"3000") && (document.getElementById("word_count").value<"400"))
{
alert("Please enter less than 3000 or more than 400 words.");
document.getElementById("word_count").focus();
return false;
}
i am not good in javascript.. so please can any1 help me????