You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Newton <ne...@yahoo.com> on 2008/03/08 20:27:18 UTC

[OT] Re: Struts1 - how to reload parent window from popup

Doesn't the popup get a reference to the opening window?

Seems like you could populate the form directly via the DOM and submit it the
same way.

Dave

--- bhaarat Sharma <bh...@gmail.com> wrote:

> I am trying something like this
> function openPopup() {
> windowReference = window.open('<html:link
> page="/addContactInformationPopup.do"
> 				name="paramsName" scope="page">','windowName');
> if (!windowReference.opener)
> windowReference.opener = self;
> }
> 
> <a href="javascript:void(0);" onclick="javascript:openPopup(); return
> false;"> Add Contact</a>
> 
> I cant JUST pass /addContactInformationPopup.do to the window.open
> because then the parameters arent passed to the popup window.
> 
> But the above code is opening 2 windows...first one doesnt have passed
> parameters..second one does..
> 
> On Sat, Mar 8, 2008 at 11:56 AM, bhaarat Sharma <bh...@gmail.com>
> wrote:
> > Hello
> >
> >  I am wondering if there is anyway to reload a parent window from the
> >  popup window.
> >
> >  Basically I have a parent window that has a 'Add Contact' link up top
> >  and then list of added contacts.  When user clicks the addcontact info
> >  a popup window is opened where users enter information and click add.
> >  Upon clicking Add in the popup window the popup window disappears but
> >  user has to manually refresh the parent window in order to see the
> >  added information.  I am wondering if there is any way to do this via
> >  javascript where everytimg the popup window is closed the parent
> >  window is reloaded.
> >
> >  I visited some javascript forums regarding this issue but they are
> >  saying to directly to the popup window like this
> >  function openPopup() {
> >  windowReference =
> window.open('/addContactInformationPopup.do','windowName');
> >  if (!windowReference.opener)
> >  windowReference.opener = self;
> >  }
> >
> >  However, in my struts1 code i need to pass parameters as well.  So
> >  link on my parent window that opens the popup window looks like this.
> >
> >  <html:link page="/addContactInformationPopup.do"
> >                                 name="paramsName" scope="page"
> >                                 target="_blank">Add Contact</html:link>
> >
> >  I'd appreciate any help.
> >
> >  thanks!
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org