
how can apply validation when doing submission like following
<html>
<script type="text/javascript">
function submitform()
{
document.forms["myform"].submit();
}
</script>
<form id="myform" action="submit-form.php">
Search: <input type='text' name='query'>
<a href="javascript: submitform()">Submit</a>
</form>
</html>
in this validation i have to apply is that text box can't left empty

Please visit the following link:
http://www.roseindia.net/javascript/javascript-submit-method.shtml
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.