Accessing Parent Window - It Gives "window Opener Is Null" Error?

Nov 2, 2010

I'm trying to accessing the Parent window fom a sub window previously opened using window.open.I'm using firebug to t yand debug, and it shows that this DOM entry exists..window.opener.location.href.But trying to access it gives "window opener is null" error.I've tried all these, and get the various errors tagged on the end...

<script language="JavaScript">
//alert(opener.location); // = opener is null
//alert(opener.location.href); // = opener is null[code]......

View 9 Replies


ADVERTISEMENT

Window.opener.location - Error "window Opener Is Null Or Not An Object"

Apr 4, 2010

Code:
<html>
<head>
<script type="text/javascript">
function closeWindow()
{
window.opener.location='www.gafarrons.org'
[Code]...

the error message is "window opener is null or not an object"

View 4 Replies View Related

Window.opener Either Blocks When I Referesh The Parent Page Or Opens In New Window?

Aug 11, 2011

I am trying to usw window.open , upload a file in the child window and then referesh the parent window. But once upload is done, window . opener .location.href or opener.location.replace sends a message back but I get a pop up blocker, so if I turn pop up blocker off, it opens in new page. I just want the parent page to refresh on the same window. This works on some employees stations but not on others..I don't know if there are any settings on IE that need to change, I tried everything...weird. does any one done this before?

View 1 Replies View Related

Window.opener.location - Set The Parent Window(main Browser)

Nov 13, 2011

I'm using window.showModalDialog but having an issue trying to set the parent window(main browser). I open modal window A which is then opens modal window B, top of modal window B onload I do window.opener.close()". My issue now is when i'm finished with B I set parent window(main browser) to a new url with window.opener.location. So my problem is modal window A the parent has been closed so window.opener.location will not work.

View 3 Replies View Related

IE: Window.opener Is Null?

Feb 4, 2009

I open a new window from a JSP.

Code:
function modalWin() {
var url="AddFormSelect.jsp?Application=<%=sApplication%>&PANE_ID="+activePane;
if(activePane!=null){[code]....

And in IE7, window.opener is null, whereas it works fine in FF.

View 5 Replies View Related

Parent.Window.Opener - Current Page Redirected?

Nov 7, 2010

I am looking through the code on a web page and it has the following link in the script tag within the header:
Code:
if (parent.window.opener) parent.window.opener.location='[URL]';

My assumption, and research on the internet would suggest that it is redirecting the user to Google, but I am a bit confused by the 'parent window' and wanted to know a few things, such as:
- Would the current page be redirected, or would a new window open?
- If the page was triggered for a second time, within seconds of the first time, would the redirect still work?
If my understanding of the code is correct, I'm confused as to why it is on this page, as the page contains information, yet is redirecting the user to another page on load.

View 1 Replies View Related

Window.open & Accessing Parent Variables' Values

Jul 23, 2005

I have got a following problem with using javascript:

I have a HTML page with pictures' thumbnails. After clicking on any
thumbnail, I would like to open a new window with the original size
picture. In the main window with thumbnails, I have got following
important stuff: Code:

View 1 Replies View Related

Window.open() Amd Window.opener.document In FireFox

Mar 14, 2009

Firstly I know this issue has been addresses a lot already but as a newbie to HTML and Web Development I am unable to get the idea. according to documentations and solutions proposed on different forums a popup or child window can be only closed using window.close() if it is opened via window.open() function.

[Code]...

View 2 Replies View Related

Submit A Form In Popup Window To Opener Window

Oct 11, 2006

I have a form that is in a popup window. I need the form to submit to the opener window. Is is possible to do that? The opener window is the main window so it is does not have a name and there are no framesets.

<form action="something.php" method="post" target="????">
I'd like to use window.opener in the target but that's JavaScript...

I know somebody has done this before and has the code.

View 2 Replies View Related

Window.opener Not Correct When Window Reopened

Jul 23, 2005

I see this problem in IE but not Firefox. I have a page that opens a second page as a dialog box. If the Dialog is relaunched from a second instance on the page the Dialog window is reused, the controls are reinitialized but window.opener still refers to
the original opener. I have simplified code than demonstrated the problem. Code:

View 5 Replies View Related

Window.opener, Form.opener?

Jul 14, 2006

I see how the window.opener works, pretty neat in that the pop window
knows the parent.

Is there a property that also knows the form field parent?

My function does not know which of the 3 select menus called it.

What can I do?

function onCarrierSelect() {
//
var frm = document.carrRequestForm.carrierList.selectedIndex
var selectCar =
document.carrRequestForm.carrierList.options[frm].text;
alert(selectCar);
if (window.opener && !window.opener.close)
window.opener.document.form(x how make global?).nbcarrier(x how make
global?).value = selectCar
window.close();
}


p.s. as an aside I know the form field name, it is literally in the
querystring, but that is ASP/vbscript and no way to get it into the
jscript function...

View 4 Replies View Related

Using Window.opener To Try And Set A Value In The Originating Window

Jul 23, 2005

I am new to JavaScript but until now, have felt my way along fairly successfully. I have a page showing an image to the user. I use window.open to open a separate page, listing a bunch of different images that the user can select. When the user clicks "Submit", I'd like the image
selection page to close and update the image on the originating page.

To "play around" with this command until I can use it successfully, I wrote the following;

function Button1_onclick() {
window.opener.document.bgcolor='bisque'
window.opener.location.reload()
window.close()
}

The line for changing the back ground color to bisque I pulled from the netscape site javascript reference for Window.Opener.

View 2 Replies View Related

JQuery :: Accessing Window DOM Through Window Object

Jun 23, 2009

Goal: From window A, I want to manipulate the DOM of window B, where window B is the result of calling window.open(). My attempts are shown below, but Window B is never updated.
winRef = window.open("","Window B");
Try 1:
$(winRef).find("body").append("<div id=container>mr container</div>");
Try 2:
$(winRef).find("body").html("<div id=container>mr container</div>");
Try 3:
$(winRef.document.body).append("<div id=container>mr container</
div>");
Try 4:
$(winRef.document.body).html("<div id=container>mr container</div>");
The jQuery Core doc [URL] claims that it can wrap a window object. Browser is FF2.0

View 2 Replies View Related

Automaticaly Clsoe The Parent Window When The Child Window Opened In Firefox?

Mar 24, 2011

i have this code i need to close the parent.html window when the child window opened, i need the code for that working well in IE and Firefox Parent.html

<HTML>
<SCRIPT TYPE="text/javascript">
function sendTo()
{
window.open('child.html','_blank','resizable=yes,width='+(screen.width-500)+',height='+(screen.height-500)+'');
}
[Code]...

View 2 Replies View Related

JQuery :: Create A Hidden Form Field In A Parent Window From Within A Child Window - Popup

Jun 13, 2011

Im trying to create a hidden form field in a parent window from within a child window (popup). I am trying to use jQuery, but unfortunately the hidden field does not get created.

Code JavaScript:

View 2 Replies View Related

Javascript Popup Window That Stays In Front Of Parent Window?

Jul 20, 2005

I have a couple of utility windows - a calculator and a calendar that popup
from my main window. I would like them to always stay in front of the parent
window until they are shut down with there own close buttons. As it is, when
you click back to the parent window, of course it comes in front of the
child windows. Can I do this?

View 4 Replies View Related

Getting Data Back To Parent Window Field From Popup Window

Apr 7, 2007

My problem is that ..... I have to select Data from Popup Window and get that Data back to my Parent window's textarea field..

View 2 Replies View Related

Capture Child Window Close Event In Parent Window?

Feb 1, 2010

I have an HTML page where I am opening a child window using window.open. the child window is something like yahoo.com. I want to refresh the parent window when the child window is closed.

View 1 Replies View Related

Trigger Action In Parent Window When Child Window Closes?

Jun 25, 2009

Put a link on my page that will open an external site (over which I have no control) in a pop-up window. When the user closes the pop-up, I want my original page to redirect to another page. The difficulty I'm having is that I can't add any code to the page in the pop-up as it's not my site.

View 4 Replies View Related

Window.opener In NN7

Jul 23, 2005

If i open a link either by using the right mouse menu "open in new window"
or press shift (IE) on the link the page will be opened in a new window.
From this window I can use the window.opener object to access the opening
window.

When doing this in NN7.1 I cannot access windows.opener. If I open the
window with window.open I can also use the window.opener to access the
opening window but not if I open the new window by pressing CTRL an clicking
the link or using right click "Open link in new window".

Is it only possible to access the window.opener if the window was opened
with window.open in NN7?

View 1 Replies View Related

Window.opener

Jul 23, 2005

I have a normal window cotaining a form (named form1). The form has a text
input called imageURL. There is a button that, when clicked, opens a new
window that contains three frames (left, right and bottom.) In the right
frame is another form (named form2) with a hidden input (selected). When
form2 is submitted, I want the value of selected to be passed back to the
imageURL on form1 and then close. The code I have tried is as follows:

(From my frame...)
<SCRIPT language="JavaScript">
function passValues()
{
// pass variable back to parent window
window.opener.document.form1.imageURL.value =
document.form2.selected.value;
}
top.window.close();
</SCRIPT>

It closes just fine, but imageURL on form1 never changes.

View 3 Replies View Related

Closing A Parent Window The Child Window Should Also Get Closed?

Apr 2, 2006

How can I trap, that on closing a parent window the child window should
also get closed.

View 1 Replies View Related

Call Parent Window Function From Child Window?

Jan 18, 2010

I have created and opened a child window called "checkwin" and have written some data to it. If the data is valid, I want the user to click on the 'CONFIRM' button on the child window, at which time I want the "submit()" function for the form on the parent window to be executed. If the data is invalid the user clicks on 'MODIFY' and I want focus to return to a field on the parent form. However, when I click on the "CONFIRM" or "MODIFY" buttons on the child window, nothing happens. Here is the code:

checkwin.document.write("</td></tr><tr><td align='right'><input type='button' value='CONFIRM'
onclick='opener.document.personnel_form.submit()'></td><td></td><td><input type='button' value='MODIFY'
onclick='opener.document.personnel_form.first_name.focus()'></td></tr></table>")

View 1 Replies View Related

Change Parent Window When Modal Window Is Open?

Apr 14, 2009

i want to change parent window while modal Window opening or opened

my php code is

Code:
<li>
<div class='newsPopUpModal'>
<a href='#'

[Code].....

View 1 Replies View Related

Close Child Window When Parent Window Closes?

May 3, 2009

I'm trying to create code to close the child window I'm creating if the parent window is closed. Here's my code so far:

function openWindow() {
var newWin = window.open(); // open the new window
newWin.document.write('<h1>Child Window</h1>

[Code]...

The above openWindow function is used in this event: <input type="button" name="btn" onclick="openWindow()"value="Open a new window" />

I can generate the new window fine. I just can't close it if the parent window is closed.

View 1 Replies View Related

Pass Array From Child Window To Parent Window?

Jun 22, 2009

My scenario is like this.

1. Click on button and pop up child window.

2. Select multiple checkbox and submit array which send back to parent window and value store in a hidden variable.

i manage to do pop up child window, pass textfield value to parent window. But it cant send php array to parent window. Please help. I'm not good in js. code...

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved