I have a pop up window coming on click of a button. There is submit button on the pop up and 3 text boxes. If I enter the value in the text boxes and hit submit button, the desired operation is working properly. But the action is call even when I close the pop up window, need to avoid that. Please find the scripts.
The script which is called from the parent window for the pop up is
function popUpPostPayment(){
var popUpPostPayment="dialogHeight: " + 200 + "px;dialogWidth: " + 460 + "px;";
window.showModalDialog("/Cola/jsp/tile/ColaPostPaymentTile.jsp",window,popUpPostPayment);
return false;
}
And the submit button's onclick even will call the script
function closePostPaymentPopUp(){
alert("test");
var parentWindow=window.dialogArguments;
parentWindow.document.getElementById("strTransactionType").value=document.getElementById("strTransactionType").value;
parentWindow.document.getElementById("strCustomerPaymentDate").value=document.getElementById("strCustomerPaymentDate").value;
parentWindow.document.getElementById("strTransactionAmount").value=document.getElementById("strTransactionAmount").value;