Hi,
I am facing a problem for Form submitting using
java script.
JS code is :
function onClickAddTransRecv()
{
// actionType is the hidden variable in the
JSP page.
document.TransRecvInfoForm.actionType.value = "addTransRecvSubmit";
document.TransRecvInfoForm.submit();
//window.alert("TransRecvInfoForm form submitted");
OR
// alert("TransRecvInfoForm form submitted");
window.close();
OR
self.close();
}
In the action class I try to fetch the value of actionType using
String sAction = (String) request.getParameter("actionType");
Using this code when I submit the form in the Action class I get the value of "actionType" is null instead of "addTransRecvSubmit".
But if I use "window.alert" OR normal "alert" between Form submission and window closing I get the value of "actionType" is "addTransRecvSubmit" in the Action class.
Please help