[Seaside] popup window
Julian Fitzell
julian at beta4.com
Tue Feb 17 18:41:29 CET 2004
Nevin Pratt wrote:
> Anybody know of a way to do this?:
>
> I have a Seaside component, which renders a button (among other
> things). The button is hooked to an action method of the component,
> such that when the button is pressed, the method executes. (in other
> words, the component is doing just normal Seaside stuff here)
>
> But, I would like a small popup window to pop up for the user, either
> before the action method executes, or at the beginning of executing the
> action method. Then when the action method finishes executing, I would
> like the popup window to go away.
>
> Basically, the popup window would be a "Please wait..." message that
> would be displayed to the user during execution of any action method
> that needs the user to be a little more patient (i.e., action methods
> that take a long time to execute, like 15 or 20 seconds or even
> longer). Then, when the action method finishes, the "Please wait..."
> message automatically goes away.
>
> Anybody know how to do that?
Well you'll need to use javascript to accomplish that obviously. You'd
probably want to attach a script to the submit button's onclick handler
to open the window and then another to the onload handler of the <body>
tag of the completed page so that it got executed once the results were
done loading.
As I recall, when you open a window you can give it an identifier (same
as the target= attribute on an href) and you can then use that to find
the window to close in the second script. It's been quite a while since
I did anything like this though so the details are a little fuzzy.
You could try http://www.w3schools.com/js/default.asp for some info,
although scanning it quickly doesn't reveal all the necessary tricks to
me. Still, w3schools have good CSS and DHTML tutorials so it might be a
useful JS primer if you're not too familiar with it. Hopefully a google
search will turn up the remaining details for you... I may also have it
in a cookbook at work; I'll post again when I get in if I do.
Julian
More information about the Seaside
mailing list