Delay before Field.focus?

I have two inline effects…

Effect.BlindDown(‘form’, {duration:0.2}), Field.focus(‘user_name’)

Now, in IE7, field wont get focused because form element is not visible
at the time execution.

How can I delay second (Field.focus) thing by 0.3 so it wont clash?

On 5 Apr 2008, at 16:56, Vapor … wrote:

I have two inline effects…

Effect.BlindDown(‘form’, {duration:0.2}), Field.focus(‘user_name’)

Now, in IE7, field wont get focused because form element is not
visible
at the time execution.
How can I delay second (Field.focus) thing by 0.3 so it wont clash?

You don’t actually want to delay, you want it to run after the first
one. if it was actually an effect, you could probably use the effect
queue for that, but Field.focus isn’t. Anyway, what you can do is

Effect.BlindDown(‘form’, {duration: 0.2, afterFinish: function()
{Field.focus(‘user_name’)}})

Fred

supercool
thanks Fred!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs