?
Solved

javascript window.opener.name

Posted on 2007-03-30
5
Medium Priority
?
6,346 Views
Last Modified: 2012-05-05
I have a jsp program that contains some javascript code that has the following code:

frm.target = window.opener.name;

In one case window.opener.name is blank. I could not find a very good explanation window.opener.name with GOOGLE. Could someone please give me either a good explanation or a link to one.
0
Comment
Question by:everypoint1
[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
5 Comments
 
LVL 15

Accepted Solution

by:
stanscott2 earned 1000 total points
ID: 18826964
0
 

Author Comment

by:everypoint1
ID: 18827084
Great link, thank you. After doing a little more investigation I discovered what is causing my problem. I am using Mozilla and when there is more than one tab open in one window the window.opener.name is blank so the above code does not work. Would anybody know of a way around this?
0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 1000 total points
ID: 18828106
Please explain exactly how you arrive at that conclusion.
I cannot recreate that.

My openers show just fine

If I have these files:

test1.html:
<script>
window.name="opener1";
</script>
<a href="#" onClick="window.open('test2.html','_blank'); return false">Open</a>

test2.html

<script>
alert(window.opener.name)
window.name="opener2";
</script>
<a href="#" onClick="window.open('test3.html','_blank'); return false">Open</a>

test3.html

<script>
alert(window.opener.name)
alert(window.opener.opener.name)
</script>
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

764 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