Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

windows.opener Javascript doesn't work in Netscape ?

Posted on 2004-10-06
1
Medium Priority
?
1,008 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 1000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Suggested Courses

885 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