You have understood what you need to do but you just have an error in your code: Remove the "new" in afterFinish:new function(obj) , it's just afterFinish:function(obj)

Seb

On Mar 31, 2007, at 3:35 PM, Rüdiger Schulz wrote:

Hello,

I'm using window.js to open a login.dialog on my page. This already
works very well, but now I want to focus the first form field when to
dialog appears. I tried to add a callback via showEffectOptions, but
this is called before the effect starts.

The docs at http://wiki.script.aculo.us/scriptaculous/show/CoreEffects
on the other hand say:

afterFinish: Called after the last redraw of the effect was made.

        Dialog.info($(loginPanelId).innerHTML, {
                windowParameters: {
                        className:"ipwindow",
                        opacity:.8,
                        width:400,
                        height:250,
                        draggable:false,
                        showEffect:Effect.Appear,
                        hideEffect:Effect.Puff,
                        showEffectOptions: {
                                afterFinish:new function(obj) {
// FIXME this is called at start of Effect ?
                                        alert(foo);
                                        $(loginFormId).focusFirstElement()
                                },
                        }
                }
        });

Are there any suggestions on how to achieve this?

thanks,

Rüdiger

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to