Reputation: 59
Im using the below function:
function GetRowValue(val) {
window.opener.document.getElementById("UniqueKeyField").value = val;
window.opener.__doPostBack();
window.close();
}
window.opener.__doPostBack error
and Even if i have window.Close()
function Popup window is not closing.
Upvotes: 0
Views: 117
Reputation: 1118
One option would be a Session variable.
function GetRowValue(val) {
var uniqueKey = window.opener.document.getElementById("UniqueKeyField").value;
//ASP code here for assigning Javascript var to session var
'<%Session["UniqueKey"] = "' + uniqueKey + '"; %>';
window.close();
}
Fetch variable with Javascript (if needed)
<script type="text/javascript">
function GetUniqueKey()
{
var uniqueKey = '<%= Session["UniqueKey"] %>';
}
</script>
Upvotes: 1