Content Swapped Between Child And Parent Windows?

Apr 28, 2010

I have a form that submits parameters to Stripes action. The action builds a URL, fetches a PDF from that URL and returns the PDF to the browser. Stripes has a neat StreamResolution object that takes the URLConnection and MIME type and returns the object which I can simply return to the browser.I also have a requirement that the document should be opened in a new window.Unfortunately, sometimes PDF generation takes a while, so I'm required to pop up a "Please wait..." window that has to be taken down once the PDF loads.I cannot use the target="_blank" on the form, since it prevents me from hooking the javascript I need, so I use javascript to submit the form [URL]:

<form action="/..." onsubmit="viewReport('/.../foo.action?eventName=view+p=x')" ">
...
</form>

Here is the javascript that gets called

Quote:

var report;
var spinner;
function viewReport(url, report) {

[code]....

The PDF is getting fetched and displayed and the popup is taken down, but the PDF content is displayed in the original window, while the new window contains the calling page.

View 2 Replies


ADVERTISEMENT

Communication Between 2 Windows Without Having A Link Parent To Child

Jul 23, 2005

Is-it possible to modify a window from an another window without having a
link Parent To Child?

View 2 Replies View Related

Child Windows Not Closing After Refreshing Parent Page?

Nov 30, 2010

I have home page with session close button and 10 child window link and i am opening all child window.All child windows should close after clicking on session close button. Code bellow

<html>
<script type="text/javascript">
openWins = [];
curWin = 0;

[Code]....

View 2 Replies View Related

Child Windows Can Not Access Window.opener When Multiple Child Windows Are Open

Jul 23, 2005

I have a parent window that pushes a new window object onto an Array
with the following code :

OpenChild()
{

//totalNumWindowsCreated is global

totalNumWindowsCreated = totalNumWindowsCreated + 1;
childWnds.push(window.open(link, "child" +
totalNumWindowsCreated,"dependent"));

..
..
..
}

This pops up a new window with every call. In the child window I call
a parent function onbeforeunload, appClose() :

function appClose(){

if (window.opener && !window.opener.closed){
window.opener.CloseChild(getQueryString("application"));
}}

This is in my frameset tag of the child code :

<frameset ... onbeforeUnload='appClose()'>

The window.opener.CloseChild() function is called perfectly when I have
one child window open, but as soon as I create another child window
both of the open child windows don't ever call it. They do both go
into the onbeforeunload appClose() function, but do not call the
window.opener.CloseChild() function inside of this routine.

Anyone have any ideas why when I have two child windows open I can't
access the window.opener functions?

I have tried taking each new window out of the array and used the
following code in CloseChild() :

CloseChild()
{

//win and totalNumWindowsCreated are both global

totalNumWindowsCreated = totalNumWindowsCreated + 1;
var win = window.open(link, "child" +
totalNumWindowsCreated,"dependent");

..
..
..
}

View 1 Replies View Related

Parent Child Checkbox - Only Same Name Of Child And Parents Should Be Unchecked

Oct 28, 2010

I have created parent child checkboxes. When one child is selected, then parent of that child, other child of same name and parent of that same name's child will be selected... Now I want if I unchecked any child, then only same name of child and parents should be unchecked or if I unchecked Parent Child, then same name of parent and child will be unchecked.

[Code]...

View 1 Replies View Related

Child Windows

Jul 23, 2005

On load of index page i am opening few child windows for some purpose now i want if i close the parent window all child should be cloed automatically.

View 1 Replies View Related

Scriptaculous And Child Windows

Jun 5, 2007

I wrote an application, it runs locally on my laptop, nothing to do with the Internet or client/server stuff. Using Firefox 2.0

I open my main 'GUI.html' file. That in turn opens a local file
called 'DSK.html'. (GUI is the control panel, and DSK is the visual
window) Code:

View 3 Replies View Related

Is There A Way To Return The Child Windows?

Apr 4, 2006

I know that var win = window.open('page.html'); will open a new window and give me a reference to that window. I understand that completely. Let's say that I have a child window created but I don't have a variable representing that window? Is there a way to return a collection of the child nodes of a window? Sort of like the way frames[] work?

View 6 Replies View Related

Need Help, Using JS To Change A Child Windows Iframe

Aug 12, 2004

I'm currently working on a site that consists of several Iframes. I need to create a page that will load this site with a specific page in the main Iframe as opposed to the normal index page. So far I've simply created a dummy page that opens up the site in a new window and attempts to change the location of the main content Iframe using this piece of js:

Code:

function init()
{
var site = window.open('index.htm', '', '');
site.document.content.location = 'news_caster.htm'
this.close();

View 8 Replies View Related

New Windows Disappear Behind Parent Window?

Jun 17, 2011

I'm using the popup window maker by Nic Wolfe on my new site to display "pagelets" with product details.

[URL]

When I click on a product link on the main window, the "pagelet" appears. Fine. However, when I click on another product link, the first "pagelet" disappears the instant I click, then the new "pagelet" appears. If I root around, I find the first "pagelet" hiding directly under my browser's main window.I'm running FireFox 3.6.11 on Ubuntu. how to keep those new pages in front of the main page that spawned them?

View 4 Replies View Related

Getting Value From Child To Parent IFrame?

Feb 4, 2009

I have one page which have two ifrmaes, parent iframe contains no of child iframe. Now oncliking child iframe check box, I have to get that value into parent iframe, I managed to create array of parent iframe but can't get child ifrmae's control. I used like this:
document.getelementbyid("iframeparent1).document.getelementsbyname("Check1")
but it doesn't work.

View 2 Replies View Related

Parent And Child Checkboxes

Jun 1, 2005

I currently have populated checkboxes in my form. I would like to write script that by clicking on a parent checkbox it will automatically select the child checkboxes as well.

The current Script I have is only the parent with a name and populated value attached to it. I would like to attach child checkboxes for each checkbox that appears from code below.

<input type="checkbox" name="price" value="<%Response.Write Recordset("price")%>"/>

View 7 Replies View Related

Params Between Parent And Popup Windows Using IE (everything's Fine With Firefox)

Sep 15, 2005

I have one page with <select> list in it, which opens a popup with
another <select> list. Those two list are linked... When I select
something in the list that is in popup window and confirm the selection
(by pressing button), I call a function that fills the "parent" window
and forces popup to close. All this is accomplished by directly
accessing another list:

for(var i = 0; i <= selLength; i++){
name = parent.window.opener.listValues.options[i].text;
value = parent.window.opener.listValues.options[i].value;

self.document.form1.itemList.options[i] = new Option(name, value);
}

And this doesn't seem to work with IE. With Firefox is OK.

Any ideas how to make it work with IE?

View 5 Replies View Related

Access Chiled Windows After Refref Parent Window?

Jul 15, 2010

how to access child window after redirect parent window.i need to write a value containing in the form field to dynamically created row in a child window. again and again I can do it only once, after submit and redirect back to the form then try to submit new value series it is not write in a child window.

View 3 Replies View Related

Child To Parent Window Communtication

Jul 23, 2005

I was curious one day and started to explore the whole idea of a
document opening a pop up and that pop up being able to send data, that
was input by the user, back to the parent. Does anyone have expirence
with this?

View 3 Replies View Related

Open Child And Close Parent

Aug 13, 2005

How do you open a new window and closed the parent window. ie click on link and new window opens in place of original window.

Is there some way of combing window.open and window.close?

View 1 Replies View Related

Generic Parent/Child Communications

May 3, 2006

I have 40 or 50 inputs scattered among many pages that all need the
ability to open a popup which allows the user to navigate a file
directory structure, locate a specific file, and return the fully
qualified file name to the parent window input. All the 40 or 50 inputs
have unique IDs. Given any one input ID, I have everything working
perfectly: the parent form opens the popup using
window.open("FileFinder.aspx?dir=" + UserRootDirectory + "&InPutID=" +
IdCodeInOnClick);

Popup talks back to parent using window.opener.document...

Like I said, give me the input field ID and I can make everything work
every time... but it makes NO sense to write 40 or 50 functions, one
for each unique input field. I tried using

window.opener.document.forms[0].getElementByID(InPutID).value

but I keep getting an error message about something requiring an
object. Is there a way to accomplish this? Also, since I'm new to
JavaScript (and web programming generally), is there a good tool for
debugging JavaScript intended for IE?

View 5 Replies View Related

How To Control Child Rows From Parent

Nov 30, 2009

I have a table of data, grouped by Month, Year and then ProjectID:
- Month, Year
- ProjectID
- Job1
- Job2
The Month, Year row controls a collapsable row (ProjectID) and in turn, the ProjectID row controls the Job row(s). The problem I'm having is that if the Job row(s) is open, then 'close' the Month, Year row, the Job row(s) stay visible. How can I control all 'child' rows from the 'parent' Month, Year control?

PHP Code:
<?php
$previousProject = '';
$previousMonth ='';
if ($totalRows_rsInvPending > 0) {
// Show if recordset not empty
do {
if ($previousProject != $row_rsInvPending['projid']) {
if ($previousMonth != $row_rsInvPending['themonth']) {
// for every Project, show the Project ID
?> .....

View 2 Replies View Related

After Open A Child, How To Keep Parent On Focus

Oct 14, 2009

After open a child window, I would like to keep parent window on focus. I tried self.focus(), set new window in blur() as well as setting the setInterval, none of them works in either Firefox or IE. I think this question relates to the opening window in tab rather than in new window.

View 2 Replies View Related

Parent/Child Popup Window

Aug 1, 2003

I have a web page w/ a popup window.

Here isthe problems that I'm trying to solve when I want the user to close the popup window via a "Close Window" button.
fyi the popup window contains a survey.

If parent window is open & minimized
> Then I can't bring to focus on the parent again, it stays minimized.

Is there an easy way to maximize the parent again?

View 1 Replies View Related

Parent / Child Window Issue...

Aug 2, 2004

A site opens a new (popup) window using javascript (so it *is* named in JavaScript)

The new window contains a page which includes an iFrame....

So we have the following.....

Top Parent Window
|
Popup Child Window -- iFrame

Inside the iFrame we have an ASP dynamically generated page that includes links that we need to open in the top level parent window.

View 1 Replies View Related

Child And Parent Passing Values

Mar 23, 2006

I have a parent page who allows user to view an invoice for service. My page bases the date and the value for payment to <%now%> and to <%total_price%>.
However I'd like to permit for users to editing those two fields by opeing a popup window with a new form and asking for these two new inputs. Afterward off corse, this values need to populate the equivalent fields on the parent page.

My questions:
1)I'm opening the new window after a js confirm instead of href or onclick methods, so I don't know how to pass the parent variable ID to the child window..

The code:
if (confirmation) {return true;}else{popupwindow("invoice_editing.asp?ID="id"");}

Problem:
the parentID=request.querystring ("ID") don't work

2)My child window picks the new values from the form... but I don know how to pass back the new values to the parent page and then reload it..

Please, but as much specific as you can to my problems and also please put the whole code of proposed solution, since I'm totally lost.

View 3 Replies View Related

Pass A Value From Parent JS To Child Window?

Jan 10, 2010

I need to pass a value from parent JSP to child window / pop up window.

in pop up window, i have a textbox which has id as rs and name as remSeconds

from parent i need to pass the value calculated from a timer which is remainingTime. code...

View 13 Replies View Related

Refreshing Parent Window When Closing Child

Jul 23, 2005

Is it possible to refresh a parent browser window when a "child"
browser window has been closed using the [X] button in the upper right
corner of the browser?

When I refer to child window, I mean that a link within a "parent" window has opened a new browser window.

View 2 Replies View Related

How To Keep Child Window Open When Parent Closes?

Jul 23, 2005

I have a closed box system which opens an html page. The page closes by the
system. I have access to the html page. I added code to open a child window
from this page. However when the parent window closes, the child closes
too. Is there a way to keep the child window open? Yes keep it orphaned.

View 2 Replies View Related

Positioning A Child Window Relative To The Parent

Jul 23, 2005

I have made a remote control window which opens from its parent. On loading, the remote is positioned relative to the screen using window.moveTo(x,y).

What I would like to happen is the remote control to open docked in a
specific location relative to the parent (opener).

Fortunately, I need this to work ONLY in IE, so at least I don't have to
worry about cross-browser issues.

Does anyone know how to open a window realtive to an anchor in the parent
wiondow?

View 20 Replies View Related







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