Solved

windows.opener Javascript doesn't work in Netscape ?

Posted on 2004-10-06
1
998 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
1 Comment
 
LVL 36

Accepted Solution

by:
Zyloch earned 250 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Now-a-days, indirectly, postal services have been replaced by email services. Yes, whenever we hear the word "email" a lot of people only think of gmail. Some people still think that email and gmail are one and the same thing :-). Let's see some …
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now