[Seaside] Re: Open URL in new window

Paul DeBruicker pdebruic at gmail.com
Sun May 24 14:18:32 UTC 2009

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'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
know enough javascript yet to know whether and how I can feed the
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: ...
> or with JavaScript, which gives you more control
> 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
> possible but requires some JavaScript. In general Seaside applications
> 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

More information about the seaside mailing list