dcsimg
I need your help about pop up
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   khelil_gribaa
Posted On:   Wednesday, December 31, 2003 12:39 AM

Hi, my problem is that I open a pop up window with the script "window.open()" and then after entering data, I need to submit the form to a servlet and at the same time close the pop up. I need that the data entered in the child window appear into the parent one, and I have to go to the servlet for data processing. What I do is : in a function on the child window I wrote : document.forms[0].action = "servelt name"; setTimeout("window.close()","100"); document.forms[0].submit(); The child window closes and it submits, but it doesn't put the data into the parent form. I tried to add : document.forms[0].target = "_parent"    More>>

Hi,

my problem is that I open a pop up window with the script "window.open()" and then after entering data, I need to submit the form to a servlet and at the same time close the pop up.

I need that the data entered in the child window appear into the parent one, and I have to go to the servlet for data processing.

What I do is : in a function on the child window I wrote :

document.forms[0].action = "servelt name";
setTimeout("window.close()","100");
document.forms[0].submit();


The child window closes and it submits, but it doesn't put the data into the parent form.

I tried to add : document.forms[0].target = "_parent" and I also tried the _top but nothing happens, the servlet treatment is perfect but the response is lost, the main form is not refreshed.

thanks for your help.

   <<Less

Re: I need your help about pop up

Posted By:   Jerry_Lampi  
Posted On:   Wednesday, December 31, 2003 03:00 PM

You can try setting the parent page data by:
window.opener.document.forms[0].WhateverYouNeed



If this doesn't work, you may have to force a submit of the parent page and then show the data. Pop-up's call to servlet stores necesary data in a bean or whatever and the main page gets it from servet:



Pop-up in BOBY html tag:


onUnload="window.opener.document.forms[0].submit();setTimeout('self.window.close()',200)"



Parent in FORM html tag:






Hope this helps.
About | Sitemap | Contact