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/ 7 6071
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.
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/
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?
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.
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.
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.
Richard Cornford wrote: what is your point?
I have a feeling you and I are having two entirely different
conversations :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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?
|
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;
|
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.
|
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)
%>
|
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
| |
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...
|
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
|
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...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |