Can I trigger a javascript function on the opener page from the user clicking a button on a popup page?
For example, on the opener (parent) page there will be a js function called: function doselect(fieldvar)
When the user clicks the botton on the popup window, I need to activate that doselect function on the parent window, with "paidAmt" as the fieldvar.
Any idea how I would do that?
Here's my current code for the popup page which works for passing the text field value back to the opener page. What can I add to this to trigger the doselect(fieldvar) function with "paidAmt" as the fieldvar?
For example, on the opener (parent) page there will be a js function called: function doselect(fieldvar)
When the user clicks the botton on the popup window, I need to activate that doselect function on the parent window, with "paidAmt" as the fieldvar.
Any idea how I would do that?
Here's my current code for the popup page which works for passing the text field value back to the opener page. What can I add to this to trigger the doselect(fieldvar) function with "paidAmt" as the fieldvar?
Code:
<html><head>
<script language="JavaScript">
function dosubmit(paidAmount) {
window.opener.document.forms[0].paidAmt.value = document.forms[0].paidAmount.value;
window.close();
}
</script>
</head>
<body>
<form name="frmPaidAmt" method="post">
Enter Paid Amount: <input type="text" name="paidAmount">
<br>
<input type="submit" value=" Make Selection " onclick="dosubmit(paidAmount)">
</form>
</body></html>