Re: Navigate back from Popup-Window
Jürgen Lorenz Simon <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Susanne,
On 15.02.2008, at 10:25, Susanne Schneider wrote:
> Hi J.L.,
>
> this should be just a matter of plain html-targetting: you have to
> supply a "target" for your action-link. If the opener window has no
> frameset this could just be the "opener" name as this is the
> standard javascript object name for that (as far as I remember
> without research in "http://de.selfhtml.org/javascript/objekte/
> index.htm").
> If the opener window has a frameset than you have to specify either
> the top or one of the frames as the target by name depending on
> your needs.
Selfhtml was the first place I looked. Using window.opener was my
first guess too.
However, it opened another tab in the popup window ....
I have another component, which does the job flawlessly. The big
difference is, that
the hrefs for the links in that popup point to direct actions and
are not the result of a
component's action method.
In this case, I want to return a component's action method results in
the original window,
that opened the popup window.
> In either case, sometimes it is better to give the target a custom
> name and use that as the target (build a name with some session
> value). Since the feature of Firefox that the tabs could be moved
> around you will get surprising results if you try to address the
> "opener". The page will be most likely directed to the last active
> tab, if it belong to your application or not.
Exactly.
I found an example which fits a little here: http://en.wikibooks.org/
wiki/Programming:WebObjects/Web_Applications/Development/Examples/
Open_Link_in_New_Window
Hyperlink3: WOHyperlink {
action = myCustomAction;
onclick = "return openInNewWindow(this)";
target = "_new";
}
I thought that I could get to my goal by replacing the target="_new"
with target="window.opener",
which indeed seemed to work partiallty. The big problem was, that the
page was also displayed
in the popup window, which I would like to leave unchanged.
I think the question is, if I can generate a URL for the page
resulting from a component's action
method, without actually displaying it, then hooking that up to the
href of the hyperlink?
J.L.
_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev