[Proto-Scripty] Re: Setting focus after Ajax.Updater complete?

2009-09-28 Thread DJ Mangus
If the id 'editdescription' is added to the DOM it won't have been processed by the browser OnComplete. You will have to delay the function. Sent from my phone so pardon the spelling errors. On Sep 27, 2009, at 10:59 PM, Steve Marshall ste...@westnet.net.au wrote: Hi all. I'm brand-new to

[Proto-Scripty] Re: Setting focus after Ajax.Updater complete?

2009-09-28 Thread T.J. Crowder
Hi Steve, DJ, In my experience usually it *is* there by the time onComplete is called, but just in case it is a matter of the browser not having caught it's breath, Steve you can use Function#defer[1] to give the browser a moment. It may be overkill, but you could even encapsulate this into a

[Proto-Scripty] Re: Setting focus after Ajax.Updater complete?

2009-09-28 Thread Steve Marshall
Thanks for the very quick replies. I've discovered in the meantime that it actually DOES work perfectly fine on Firefox - just not on IE7. These are the two browsers I normally test stuff on. So if it's me, it's only partly me ;-) I'll try the defer. Thanks again. Cheers Steve On Sep 28,

[Proto-Scripty] Re: Setting focus after Ajax.Updater complete?

2009-09-28 Thread Steve Marshall
Well, I tried rewriting the focus call as: onComplete: function() {$('editdescription').focus.defer(); Is that the right way to put it? Please remember I'm very new to all this, and still getting my head around it. If it is, it didn't work - in fact it stopped Firefox from working. This is not

[Proto-Scripty] Re: Setting focus after Ajax.Updater complete?

2009-09-28 Thread T.J. Crowder
Hi Steve, Well, I tried rewriting the focus call as: onComplete: function() {$('editdescription').focus.defer(); Is that the right way to put it? No, you'll need to use my function or one like it. (The function is generic, so you can add it to any utility class you have lying around and