I want to submit my form using javascript but the prob I am facing here is when using this method,the form is being submitted irrespective of the return value of onsubmit .My script is .....
Any help willl be deeply appreciated...T hanks
Code:
<html>
<script type="text/javascript">
function chk(){
document.formname.submit();
}
</script>
<body>
<form name="formname" action="from.html" onsubmit="return false" method="get">
<input type="text" name="firstbox">
<button onclick="chk()">Submit</button>
</form>
</body>
</html>
Comment