Solved

windows.opener Javascript doesn't work in Netscape ?

Posted on 2004-10-06
1
1,003 Views
Last Modified: 2013-12-16
Hi,

I've got the following script that works in IE, but doesn't work in Netscape - How can I fix it?

Thanks!



<script language="javascript">

            //Get existing html content from the opener's html textarea:

            window.html_editor.html_code.innerHTML=window.opener.<%=form_name%>.<%=textarea_name%>.innerHTML

            //Redirect to the editor page:

            window.html_editor.submit()

            </script>
0
Comment
Question by:l_agmon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 36

Accepted Solution

by:
Zyloch earned 250 total points
ID: 12242086
Hi l_agmon,

You should try this:

if (window.opener&&!window.opener.closed) {
   document.forms['html_editor'].elements['html_code'].innerHTML=window.opener.document.forms['<%=form_name%>'].elements['<%=textarea_name%>'].innerHTML;
   document.forms['html_editor'].submit();
}


This is extremely safe code, but you can also simplify it by trying this:

document.html_editor.html_code.innerHTML=window.opener.document.<%=form_name%>.<%=textarea_name%>.innerHTML;
document.html_editor.submit();



Regards,
Zyloch
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Several part series to implement Internet Explorer 11 Enterprise Mode
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question