I wrote function verify, that performing form verifivation.
Function loop through the all text elements of the form:
function verify(f)
{
for(var i=0; i < f.length; i++) {
var e = f.elements;
if e.value == null) {
alert("All Arguments are required for the Report"
this.focus();
return false;
}
}
return true;
}
The function is invoked from the onSubmit() event handler:
<form name="argumentdata" action="preview.jsp" method="get" target=_top onSubmit="return verify(this);">
I don't get any errors when running script, but function does not invoked when I click Submit button of the Form.
Function loop through the all text elements of the form:
function verify(f)
{
for(var i=0; i < f.length; i++) {
var e = f.elements;
if e.value == null) {
alert("All Arguments are required for the Report"
this.focus();
return false;
}
}
return true;
}
The function is invoked from the onSubmit() event handler:
<form name="argumentdata" action="preview.jsp" method="get" target=_top onSubmit="return verify(this);">
I don't get any errors when running script, but function does not invoked when I click Submit button of the Form.