[Seaside] Re: Open URL in new window
p3anoman at gmail.com
Mon May 25 09:24:00 UTC 2009
On Sun, May 24, 2009 at 10:18 AM, Paul DeBruicker <pdebruic at gmail.com>wrote:
> Thanks Phillipe. It is not my intention to distract or surprise them.
> I think I'm actually trying to create a convenience feature. One of
> the things I'm trying to accomplish is a form where you put in a
> ticker for a stock or mutual fund, and once you click submit it opens
> the research reports on websites such as finance.google.com or
> finance.yahoo.com or whichever and however many sites the user chooses
> in a multiselect on my form. I know I could wrap those companies
> content up in an iframe or lightbox or whatever but right now I'd
> prefer to just open a new browser window for each report requested and
> be done with it.
I just ran across this code which works for me
attributeAt: #target put: someStringValue; "Yahoo Finance or _blank"
...other form rendering ]
You may have to get imaginative to get aUrlValue to have the user entered
data as a parameter
> I've now looked into the guts of the popupAnchor and see that it
> catches the onClick event and calls the JS window.open() etc. I don't
> dynamically generated URLs to that function. Thanks for the
> information about how Seaside does it.
> On Sun, May 24, 2009 at 9:57 AM, Philippe Marschall
> <philippe.marschall at gmail.com> wrote:
> > 2009/5/23 Paul DeBruicker <pdebruic at gmail.com>:
> >> I think I don't understand what to do with Randal's suggestion. Do I
> >> put in the callback of the form submit button like this:
> >> html submitButton
> >> callback:[html anchor newTarget url: (self
> >> createUrlFromFormData); with: ''.];
> >> with: 'Open New Window'.
> >> I want to create the same effect as a popup window, where the URL that
> >> pops up is created from data in a form and the popup window appears
> >> when the submitButton is clicked.
> > That's a problem. Seaside supports opening popup windows in two ways,
> > either with the target attribute
> > html anchor
> > newTarget;
> > callback: ;
> > with: ...
> > html popupAnchor
> > callback: ;
> > with: ...
> > See WAPopupTest for an example
> > both of them work only on anchors, basically because that how HTML and
> > HTTP work. Doing it with a button in a form and the form data would be
> > have very little use for popups. You can easily put the content of the
> > popup window in a component somewhere on the page without distracting
> > or surprising the user.
> > Cheers
> > Philippe
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside