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 Prototype - just discovered it yesterday,
> and I must say it feels like I have come home. It seems to be at just
> the right level, and it just works (so far).  I'm a happy camper!
>
> One minor thing - I tried using an Ajax.Updater, and when it completes
> I want to set the focus to an entry field, but it isn't working.
> Here's my Ajax.Updater:
>
>  new Ajax.Updater('row'+code, 'svc/ajax.php', {
>  parameters: {action: 'editlibcat', code: catcode},
>  onComplete: function() {$('editdescription').focus();}
>  });
>
> This call sets a row in a table into editable form, and there's
> another Updater that does the update - pretty standard stuff I'd
> reckon.  There definitely IS an element with ID='editdescription' -
> it's in the HTML that is returned from the Ajax call.  But focus never
> gets set.  Everything else is perfect.  It must be me - what do I have
> wrong?
>
> Thanks again for Prototype - it's great!
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to