Hi All,
I am doing the validation of a file type.The form is not submitting to next page.
My code is:
[HTML]<script>
function validateform(){
if(document.tes t.browse.value= =' ' ){
alert("please enter the value");
document.test.b rowse.focus();
return false;
}
else {
if(confirm("sub mit this form")) {return true;}
else {return false;}
}
}</script>
<BODY>
<form name=test action="showcon tents.jsp" onsubmit="retur n validateform()" >
file :<input type=file name=browse>
<input type=submit name=submit value=Submit >
</form>
</BODY>[/HTML]
I didnt understand why this is happening...
Can anyone please help me.
I am doing the validation of a file type.The form is not submitting to next page.
My code is:
[HTML]<script>
function validateform(){
if(document.tes t.browse.value= =' ' ){
alert("please enter the value");
document.test.b rowse.focus();
return false;
}
else {
if(confirm("sub mit this form")) {return true;}
else {return false;}
}
}</script>
<BODY>
<form name=test action="showcon tents.jsp" onsubmit="retur n validateform()" >
file :<input type=file name=browse>
<input type=submit name=submit value=Submit >
</form>
</BODY>[/HTML]
I didnt understand why this is happening...
Can anyone please help me.
Comment