@Alex:

He'd be getting a different error if that were it; either he did have
it in quotes and just typed it wrong in his note, or he left out a bit
where he retrieved the reference into a var.  (Hence my note about not
giving us enough to work with.)

@OP:

Somewhat belatedly, I realized that the problem probably isn't what
you asked about.  The error says you can't move the focus to a hidden
or disabled element.  Is the element hidden or disabled, by any
chance?  For instance, does the container you're putting it in have a
"display: none" style?  I can replicate the error message by doing
that.  If so, that's the problem.

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jun 7, 10:02 am, "Alex McAuley" <webmas...@thecarmarketplace.com>
wrote:
> my point was .. is "input1" wrapped in quotes or not ... ?
>
> ----- Original Message -----
> From: "buda" <www...@pochta.ru>
> To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
> Sent: Saturday, June 06, 2009 8:14 PM
> Subject: [Proto-Scripty] Re: unecpected error after .update(..) and .focus()
>
> input1 is element which is inserting in divs children throught .update
> () method
>
> On 6 июн, 20:04, "Alex McAuley" <webmas...@thecarmarketplace.com>
> wrote:
> > is that meant to be $('input1') or is input1 referenced somewhere ?
>
> > ----- Original Message -----
> > From: "buda" <www...@pochta.ru>
> > To: "Prototype & script.aculo.us"
> > <prototype-scriptaculous@googlegroups.com>
> > Sent: Saturday, June 06, 2009 3:33 PM
> > Subject: [Proto-Scripty] unecpected error after .update(..) and .focus()
>
> > > I do
>
> > > var cont = '...<input id="input1"...'.makeElement(); -- put string to
> > > innerHTML in tmp div and return divs first child;
>
> > > div.update(cont);
> > > $(input1).focus();
>
> > > when i call $(input1).focus(); - an error occures - 'Can't move focus
> > > to hidden or ....'
> > > before now I believed that script engine doesnt go to the next
> > > operator untile the previous operator complits and content is rendered
> > > and ready to use. But now I see that its not true
>
> > > Help me please - how to set focus to input1 after div.update(cont)?-
> > > Скрыть цитируемый текст -
>
> > - Показать цитируемый текст -
>
>
--~--~---------~--~----~------------~-------~--~----~
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