473,837 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Submit to parent.opener

I have a popup which contains a frame set; one of the frames contains a
form. When the form is submitted, I want it to go back to the opener of the
popup. I have:

document.forms[0].target = parent.opener;

But on submit it opens a new window. If I put:

document.write( parent.opener.n ame);

it gives me the correct value, so I know I'm pointing to the right place.
Any idea why this doesn't work and/or how to get it to?

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Apr 12 '06 #1
7 6092
Alan Little wrote:
I have a popup which contains a frame set; one of the frames
contains a form. When the form is submitted, I want it to
go back to the opener of the popup. I have:
So you are not writing something suited to Internet use.
document.forms[0].target = parent.opener;
The - target - property of forms is a string, - parent.opener - will be
a reference to an object (a window object) (or null). When you assign -
parent.opener - the object will be type-converted into a string, and
that string will be, for example, "[object]" in IE and similarly
unhelpful values in other browsers.
But on submit it opens a new window. If I put:
Yes, you have targeted a window with a name like "[object]" and when no
such window exists a new one is created.
document.write( parent.opener.n ame);

it gives me the correct value, so I know I'm pointing to
the right place. Any idea why this doesn't work and/or how
to get it to?


The value you should assign to the - target - is the (string) name of
the window, and that name value is available as - parent.opener.n ame -,
so that is the value you assign:-

document.forms[0].target = parent.opener.n ame;

Richard.
Apr 12 '06 #2
Carved in mystic runes upon the very living rock, the last words of
Richard Cornford of comp.lang.javas cript make plain:
Alan Little wrote:
I have a popup which contains a frame set; one of the frames
contains a form. When the form is submitted, I want it to
go back to the opener of the popup. I have:
So you are not writing something suited to Internet use.


Perhaps not.
document.forms[0].target = parent.opener;


The - target - property of forms is a string, - parent.opener - will be
a reference to an object (a window object) (or null). When you assign -
parent.opener - the object will be type-converted into a string, and
that string will be, for example, "[object]" in IE and similarly
unhelpful values in other browsers.


Ah, I see.
The value you should assign to the - target - is the (string) name of
the window, and that name value is available as - parent.opener.n ame -,
so that is the value you assign:-

document.forms[0].target = parent.opener.n ame;


Yes, that works. Thank you.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Apr 12 '06 #3
Alan Little wrote:
Carved in mystic runes upon the very living rock, the last words of
Richard Cornford of comp.lang.javas cript make plain:
Alan Little wrote:

I have a popup which contains a frame set; one of the frames
contains a form. When the form is submitted, I want it to
go back to the opener of the popup. I have:


So you are not writing something suited to Internet use.


Perhaps not.


I have a slight problem with that particular mindset: What about evolution?

Do we want the web to stay where it is, or do we want it to continue to
evolve?
Apr 12 '06 #4
Tony wrote:
Alan Little wrote:
Richard Cornford wrote:
So you are not writing something suited to Internet use.


Perhaps not.


I have a slight problem with that particular mindset: What
about evolution?

Do we want the web to stay where it is, or do we want it
to continue to evolve?


It is the evolution of the Internet that has bought us to a position
where a design predicated upon the ability to open new browser windows
is unreliable by design. Five years ago if a script could verify the
existence of a window.open method you were pretty much guaranteed that
calling it would result in the opening of a new window, and almost total
control over the position and chrome of that window.

Then we witnessed a spate of pop-up abuse getting so extreme that users
demanded that the facility be withdrawn or restricted, and now a growing
use of pop-up blockers brings us to a position where creating a public
Internet design that requires pop-up windows is recklessly stupid.

The future may see the situation settling down again, with pop-up
blockers coalescing around predictable behaviour to the extent that you
declare a consistent notion of a 'requested' pop-up and know the
circumstances when such was viable, and maybe consistently returning
null form calls to window-open when a pop-up was blocked, so a script
could know when it was having its window opening requests refused, but
that is not the current situation.

Richard.
Apr 12 '06 #5
Richard Cornford wrote:
Tony wrote:
Alan Little wrote:
Richard Cornford wrote:
So you are not writing something suited to Internet use.

Perhaps not.
I have a slight problem with that particular mindset: What
about evolution?

Do we want the web to stay where it is, or do we want it
to continue to evolve?


It is the evolution of the Internet that has bought us to a position
where a design predicated upon the ability to open new browser windows
is unreliable by design. Five years ago if a script could verify the
existence of a window.open method you were pretty much guaranteed that
calling it would result in the opening of a new window, and almost total
control over the position and chrome of that window.


OK, so the answer is "don't push the limits"? Do we throw out that
evolution simply because it caused some hiccups along the way?

Maybe we should apply that to video recording technology? Or perhaps the
adoption of HDTV?

Different vendors responded differently. Just like with biological
evolution - not all mutations survive. Those that are more robust, for
whatever reason, survive, and will impact the future of the species.

But that evolution BEGINS with a demand for more.
Then we witnessed a spate of pop-up abuse getting so extreme that users
demanded that the facility be withdrawn or restricted, and now a growing
use of pop-up blockers brings us to a position where creating a public
Internet design that requires pop-up windows is recklessly stupid.
Evolution: adapt or die.
The future may see the situation settling down again, with pop-up
blockers coalescing around predictable behaviour to the extent that you
declare a consistent notion of a 'requested' pop-up and know the
circumstances when such was viable, and maybe consistently returning
null form calls to window-open when a pop-up was blocked, so a script
could know when it was having its window opening requests refused, but
that is not the current situation.


It is NOT possible to force a plethora of web developers and browser
publishers to do everything exactly the same. And there will be web
developers who want to push the limits - to do something beyond the
current state of the art. When enough developers desire the same thing,
the browser companies will respond - probably in different ways. Those
who produce a good solution are more likely to survive. Those who
produce a poor solution are more likely to fail, unless they adopt one
of the good (accepted) solutions quickly. Things change. Some adapt. I,
for one, am glad of it.

Thus goes evolution.
Apr 13 '06 #6
Tony wrote:
Richard Cornford wrote: <snip>
It is the evolution of the Internet that has bought us to a position
where a design predicated upon the ability to open new browser
windows is unreliable by design. ...


OK, so the answer is "don't push the limits"?


What does the practical unreliability of trying to open new browser
windows have to do with pushing limits?
Do we throw out that evolution simply because it caused
some hiccups along the way?
And what is being thrown out? The observation that a particular action
has become too unreliable to be sensible implies no more than the need
to find a different approach.
Maybe we should apply that to video recording technology?
Or perhaps the adoption of HDTV?
It has already happened, the television design invented by John Logie
Baird (the one with the spinning wheels) proved too unreliable and was
abandoned in favour of a better alternative.

<snip> But that evolution BEGINS with a demand for more.
So how does designing systems that are predictably unreliable at the
time they are designed represent satisfying a demand for 'more'? Indeed,
given that virtually anything that can be done with a pop-up window can
also be done without one, what has the got to do with anything?
... brings us to a position where creating a public
Internet design that requires pop-up windows is
recklessly stupid.


Evolution: adapt or die.


I don't see your point as stopping doing the recklessly stupid thing is
adapting.

<snip> And there will be web developers who want to push the
limits - to do something beyond the current state of the art.

<snip>

Opening pop-up windows was old hat at the turn of the century, what is
your point?

Richard.
Apr 13 '06 #7
Richard Cornford wrote:
what is your point?


I have a feeling you and I are having two entirely different
conversations :)
Apr 13 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
12459
by: Marco Alting | last post by:
Hi, I want to use the submit button of a new window to submit the form of the new window (which carries two values to the opener window) and then submit the opener form. Can anyone tell me how to do this?
2
5103
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into page1 so I want to use onunload to reload page1 to keep the data synchronized. At first I was using just window.opener.parent.location = window.opener.parent.location;
1
1737
by: Spammay Blockay | last post by:
Hi all... I'm writing a Struts application, and one window pops up another, non-modal, window. What I want to do is, when the user presses a button on the child window, I want the parent window to be the target of the server response. And I also want the child window to close. These windows are not frames, but fully-fledged browser windows.
3
10609
by: nicver | last post by:
I am working on updating a Web site with a frameset. A page opens a pop-up window in which the user uploads pictures. Once the upload is done, I would like to refresh the content of the frame which opened the pop-up but so far have failed. Here is my code: <% (ASP code which saves the photo in a database) %>
2
23517
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent window to open a child window thru javascript window.open 2) I have some functionality in the child window that changes the data
5
4617
by: Peter | last post by:
1) I have a C# web application and what I am trying to do is create a popup window from a link on the parent window 2) the popup window will have a button and when a user clicks on the button the program should update a database, close the window and refresh the parent window. My question is does anyone have a example of popup window wich will close it's self and refresh the parent window when a user clicks on a button? I know there are...
4
9771
by: Phil Powell | last post by:
I thought this would work but it seems to not work neither in Netscape nor in IE: <script type="text/javascript"> <!-- // OBTAINED FROM http://www.javascripter.net/faq/settinga.htm // NOTE THAT IF YOU SET days TO -1 THE COOKIE WILL BE SET TO YESTERDAY
1
2305
by: jerkyjerk | last post by:
Ei guys..newbie in programming..just want to ask how will I compare the contents of particular cell of the table(from parent window) to the contents of a cell of the table (child window)? how will I use ID for this? I need to compare because If the two contents are the same, no need to add the table (from the child window) to the table on the parent window.. this is my code Child window note: cell3 contents will be the basis of...
0
9843
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7811
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7005
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5670
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4476
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3126
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.