Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Window opener frame as target

Posted on 1998-11-29
Medium Priority
Last Modified: 2008-02-26
To open a new window, I use this JavaScript code : window.open("..."). In this window, when I submit a form, I want to know if this window is the son of another window and if it's the case, I want to display the result of the form action in a specific frame of the window opener. Is it possible and how I can do it ?

Thanks for your answer.

Question by:tplai
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
  • 2
LVL 75

Accepted Solution

Michel Plungjan earned 800 total points
ID: 1274762
Assuming you open the window thus:

WinId = window.open(...)
if !(WinId.opener) WinId.opener = self;

then when submitting, you can ask
if(window.opener.parent.name == 'theFather')

LVL 75

Expert Comment

by:Michel Plungjan
ID: 1274763
Be aware that target is read-only in IE3,
and a perhaps safer way would be to gather the form data and do a
if(window.opener.parent.name == 'theFather')
   window.opener.top.frames['FrameWhenFather'].location = 'http://myserver/cgi-bin/formcgi.pl?' + document.theFome.theElement.name+'='+document.theFome.theElement.value;

can alo be written


Author Comment

ID: 1274764
Thanks !

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

618 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