I have a script javascript function to send a value back to a parent page from a hyperlink and then close the modal window that was used to select it.
It works fine in IE but in chrome it does nothing and FF it simply closes the modal window and does not return the value.
I need to get the behaviour all the same across these browsers.
JS Function:
<script type="text/javascript">
function sendval(value){
window.top.document.getElementById('txtCustomerType').innerText = value;
window.parent.closeIframe();
}
</script>
ASP Gridview:
<asp:TemplateField HeaderText="Customer Type">
<ItemTemplate>
<a href="javascript:sendval('<%# DataBinder.Eval(Container.DataItem, "CustType") %>');"><%# DataBinder.Eval(Container.DataItem, "CustType") %></a>
</ItemTemplate>
</asp:TemplateField>