You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Jack Rudnick <jr...@bea.com> on 2005/09/19 15:55:00 UTC

Popup and parent window action

All,

Has anyone attempted to use a popup in the flowing sequence?

1) Open a popup from 'popup="true"' attribute on a 'netui:anchor'
2) In the popup, have an "Ok" button, that will close the popup, and
call an action in the PARENT window.

It feels like there should be a parameter or "quick-'n-easy" facility
that you can set to make this happen "automatically", however, the only
thing I can see that will assist in this is the "onPopupDone" javascript
attribute in the 'netui:configurePopup' tag.  This seems like it will
eventually let me do what I need it to, however, it also seems like will
require alot of hoops to jump through just to get the action in the
parent window.  

Any thoughts are appreciated.

Regards,
Jack


Re: Popup and parent window action

Posted by Rich Feit <ri...@gmail.com>.
Hi Jack,

Do you mean that when the popup window closes, the original window will
navigate to another action (as if you'd clicked an anchor in that
window)?  If so, then this is the kind of thing that onPopupDone was
intended for (setting its javascript to something like
"window.location='someAction.do'").  The reason there isn't an attribute
on  netui:configurePopup is that the main case for our popup
infrastructure was to leave the original window in place (no
navigation), and to map values from the popup window back into it. 
Otherwise, people were already putting things like this in anchors
within popup windows:

    window.opener.location='someAction.do'; window.close();

Which isn't *quite* as good since it requires knowledge of the parent
window's page flow, but it's pretty simple.  If I'm missing the idea of
what you're doing, though, just post an example of it (or if it's too
big, you can open a JIRA issue on me).

Rich

Jack Rudnick wrote:

>All,
>
>Has anyone attempted to use a popup in the flowing sequence?
>
>1) Open a popup from 'popup="true"' attribute on a 'netui:anchor'
>2) In the popup, have an "Ok" button, that will close the popup, and
>call an action in the PARENT window.
>
>It feels like there should be a parameter or "quick-'n-easy" facility
>that you can set to make this happen "automatically", however, the only
>thing I can see that will assist in this is the "onPopupDone" javascript
>attribute in the 'netui:configurePopup' tag.  This seems like it will
>eventually let me do what I need it to, however, it also seems like will
>require alot of hoops to jump through just to get the action in the
>parent window.  
>
>Any thoughts are appreciated.
>
>Regards,
>Jack
>
>
>  
>