c# - window.onload not working in IE8 -


i opening child pop window , calling parent function child window. not able on ie8. problem believe childwindow.onload there alternatives?

parent

function callpopup(rowindex,controlname ) {              var childwindow = open('test1.aspx', '1397127848655', 'resizable=no,width=700,height=500');             childwindow.onload = function () {                  var hidden1 = childwindow.document.getelementbyid('hidden1');                 var hidden2 = childwindow.document.getelementbyid('hidden2');                 alert('asdas');                 hidden1.innerhtml = rowindex;                 hidden2.innerhtml = controlname;             }         } 

child

<span id="hidden1"></span>         <span id="hidden2"></span>        <script language="javascript" type="text/javascript">             function updateparent(code, description) {                 var id = document.getelementbyid('hidden1').innerhtml;                var controlname = document.getelementbyid('hidden2').innerhtml;                window.opener.setvalue(id,controlname,code,description);                 window.close();                 return false;             }             $(document).on('click', '.submit', function () {                 updateparent($(this).closest('tr').find('td:eq(0)').text(), $(this).closest('tr').find('td:eq(1)').text());                return false;            })     </script> 

try adding semi-colon end of onload function e.g:

function callpopup(rowindex,controlname ) {          var childwindow = open('test1.aspx', '1397127848655', 'resizable=no,width=700,height=500');         childwindow.onload = function () {              var hidden1 = childwindow.document.getelementbyid('hidden1');             var hidden2 = childwindow.document.getelementbyid('hidden2');             alert('asdas');             hidden1.innerhtml = rowindex;             hidden2.innerhtml = controlname;         };     } 

i had similar problem in ie8 before , down this.


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -