Transfer Data From Pop Up Window To Parent Window?

Jan 14, 2011

I am currently creating which will allow the user to upload their own pictures. For this I am opening a new pop up window where the user can select the file they wish and then upload it (similar to ebay's picture upload). The pop up works fine and so does the file upload however I am having trouble transferring any data from the pop up window back to the parent window. I have been investigating the opener method but cannot seem to get it to work. Below is some simple code that I've been trying to get to work.

first page.
<form name="loadpic" id="loadpic" action="createPost.php" method="post">
<br />
<br />
Testing transfer between pages... <input type="button" value="open pop up" onclick="window.open('popup.php','pop up box','width=400,height=200')" />

[Code]...

View 2 Replies


ADVERTISEMENT

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

JQuery :: Transfer Data From Child To Parent (Modal)?

Jun 1, 2011

I have two pages parent.html and child.html, the parent has a link called "Search", when clicked the child open in a modal centered window that has a search form, the search in the child return a list of rows, so when clicking a row the child window close and data is transferred to the parent.

View 1 Replies View Related

Passing Data From Parent Window?

Nov 13, 2011

I have a script that opens up another window and a task gets executed, all of that is fine, but is there anyway that the parent window (the window that gets open) can pass data to the window that opened it? (I pretty much want to enable a button on that page)

View 4 Replies View Related

Passing Data From Parent To Child Window

Sep 28, 2006

I am trying to pass user data from a parent window to a child window. I read somewhere that if i want to pass data as soon as child window opens i need to add a pause for the form elements to load. I am using the code snippet below.objf.form_parent.text1 is a text field in the parent window and newWindow.document.test.text1. is a field in child window. Can anyone help what I am doing wrong. Code:

View 2 Replies View Related

Data String From Parent Window To Popup Not Passed

Jun 23, 2010

Inside of a page, there is a iFrame, which houses WYSIWYG editor.I'm trying to pass data (passedString: html, inline css, text ...) to a popup.When I pass same string to same div with id="idx" located on a page, where iFrame is located, it receives it without problems.Problem appears, when I try to pass string to popup.

View 1 Replies View Related

JQuery :: Transfer Data From Parent Input To Child Input?

Jan 26, 2011

I have 2 windows - parent and children.

in parent

<form name="calc" action="" method="post">
<input value="0" type="text" name="pay" id="pay">
</form>

in child

<form name="payment" action="" method="post">
<input value="0" type="text" name="pay_str" id="pay_str">
</form>

how can i transfer data from parent input to child input?

View 3 Replies View Related

Transfer Data From Popup List Box To Parent List Box

Jul 6, 2004

when i try to add a data from popup list box to parent window listbox it pops an error.
Servlet threw an exception. This is my code

var optionvalue=thisForm.behaviourname.options[i].value;
var len=window.opener.document.FormMaterialDetail.inparameterid.options.length; window.opener.document.FormMaterialDetail.inparameterid.options[len] = new Option(thisForm.behaviourname.options[i].text, optionvalue);

Is the above code right?

View 1 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

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

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

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

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

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

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

Focus On Parent Window After Closing Child Window?

Sep 24, 2009

I'm having trouble with Safari. After i close a popup it does not focus on the parent window. I have been looking around and i think its this sort of thing i need 'javascript:window.opener.focus()" target="_self"' but tbh i'm not in anyway a javascript whizz, so im a little confused.

Here is my current code to close the child window

document.write("<input name='close' class='button popup' type='button' value='Close Window' onclick='window.close()' id='close'>"

So i need to somehow, add in the .opener thing to that.

View 2 Replies View Related

Inserting Value From Popup Window To Parent Window Select

Sep 21, 2004

I am trying to insert the value of a variable gathered from a popup window as an option in a <select> menu on the main window. This is the code I have so far:

Code:
var newOption = document.createElement("option");
newOption.value = '<?=$userfile_name?>'
newOption.appendChild(document.createTextNode('<?=$userfile_name?>'));
select.insert(newOption);

How do I do the rest? I just want to add this new value to the end of the list.

View 1 Replies View Related

Link In New Window Changing Value Of <input> In Parent Window

Feb 28, 2002

I'm building a program for webmasters, and I need to have it so that I can have an <INPUT> button that, when clicked, will open up a new window (400x350 pixels) with a list of links. However, when the person clicks one of those links, the window closes, the value of an <input type="text" name="parentdoc" size="8" maxlength="8" readonly> is updated.

How would I accomplish this?

(As I mentioned above, I am very new to JavaScript, so please provide as much explanation and code as possible.)

View 6 Replies View Related

Way Of Passing Variable From Parent Window To Popup Window

Jun 27, 2002

I need the most efficient way of passing a variable from a parent window to a popup window.The reason i say "most efficient" is because i currently do it like this from the parent:[code]But this is inefficient because at times it randomly alerts "undefinded".Anyways, can someone tell me a more fail safe way to pass a var to a popup so that i will be able to access it 100% correctly.

View 1 Replies View Related

Pass Values For A Popup Window To Parent Window

Jan 19, 2003

how I can populate the value of an input field on a parent window from a selected item (of a form - listmenu) on a pop-up window? Basically, I need to pass the value of one form to another form located on a different page...

View 1 Replies View Related

Refreshing The Parent Window After Closing The Child Window?

Jan 24, 2010

I have a parent page which I don't have control of. I call my child page from parent page, perform some operations and once I click update child window should close and parent window should be refreshed.Everything seems to work fine except the parent page not refreshing.I tried using window.opener.location.reload(true). But it makes a postback in the parent page and so the values that I update are lost because it makes a postback with the previous values.I tried window.opener.document.locationwindow.opener.document.location. But this doesn't refresh my parent page.

View 2 Replies View Related







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