I have a problem changing onlick, onmouseover and onmouseout attributes of a link in a page from a popup window opened by this page. In the popup window I have this code: element = window.opener.document.getElementById('link_id'); element.onclick = function () { pop_width = 340; pop_height = 450; hspace = ( screen.width - pop_width ) / 2; vspace = ( screen.height - pop_height ) / 2; parameters = 'resizable=no,scrollbars=no,width=' + pop_width + ',height=' + pop_height + ',left=' + hspace + ',top=' + vspace; window.opener.open ( 'page.htm'', 'title', parameters ); } element.onmouseover = function () { window.opener.status = 'a_string'; return true; } element.onmouseout = function () { window.opener.status = ''; return true; } Code (markup): The problem is that this code only works if the popup window remains open. If I close it, it stops working. What can I do???
You should put this code into the parent window. Once your popup is closed, this code is no longer active.