ReportingAnalyst
MIS
Hi,
I have an onClick event for the radio buttons associated for each employee.
Javascript is:
What I am doing is submitting the employee id on click of the radio button associated with that employee, then populating a hidden text box with that employee ID.
Based on the textbox value, I feed that value to the SQL statement to generate another list of reports that the employee is eligible to see.
My question is:
How can submit to the current form? My form tag has:
When I click on the employee radio button in such a way that I submit to my current form, select other form elements, then click on the submit button where the page is being submitted to ViewReports.asp without the current form being validated.
Is that possible?
Thanks.
I have an onClick event for the radio buttons associated for each employee.
Code:
<input type="radio" name="empid" id="empid40801" value="40801" onClick="submitEmpID(this);">
Javascript is:
Code:
function submitEmpID(el) {
var f = el.form;
for(var i=0; i<f.empid.length; i++)
{
if( f.empid[i].checked )
{
//alert(f.empid[i].value);
f.Emp_ID.value = f.empid[i].value;
f.submit();
}
}
}
Based on the textbox value, I feed that value to the SQL statement to generate another list of reports that the employee is eligible to see.
My question is:
How can submit to the current form? My form tag has:
Code:
<form name="f" id="f" action="ViewReport4.asp" onSubmit="form_Validate(this);">
When I click on the employee radio button in such a way that I submit to my current form, select other form elements, then click on the submit button where the page is being submitted to ViewReports.asp without the current form being validated.
Is that possible?
Thanks.