Re: [Proto-Scripty] Re: Setting the focus on an input after an effect to show the input.

2010-06-15 Thread Richard Quadling
On 12 June 2010 10:37, bill  wrote:
> On 6/11/2010 5:07 PM, Walter Lee Davis wrote:
>
> Yes, but is there only one form on the entire page at any time? That's the
> point I was trying to get at here. If you have two inputs with the same ID,
> you can call focus() but only the first one with that ID will gain focus.
>
> Walter
>
> It is a violation of the spec to have 2 elements with the same ID.  IDs are
> supposed to be unique in a page.
>
> bill
>
> On Jun 11, 2010, at 4:57 PM, Richard Quadling wrote:
>
> The afterFinish is what I needed. Thanks.
>
> The form in question has 2 inputs and it is the first one that I want
> to get the focus on.
>
> Thank you.
>
> I didn't see anything in the scripy docs, but I've probably missed it.
>
>
>
> --
> Bill Drescher
> william {at} TechServSys {dot} com
>
> --
> 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-scriptacul...@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.
>

The ids are unique. Thanks.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
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-scriptacul...@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.



Re: [Proto-Scripty] Re: Setting the focus on an input after an effect to show the input.

2010-06-12 Thread bill

On 6/11/2010 5:07 PM, Walter Lee Davis wrote:
Yes, but is there only one form on the entire page at any time? That's 
the point I was trying to get at here. If you have two inputs with the 
same ID, you can call focus() but only the first one with that ID will 
gain focus.


Walter


It is a violation of the spec to have 2 elements with the same ID.  IDs 
are supposed to be unique in a page.


bill


On Jun 11, 2010, at 4:57 PM, Richard Quadling wrote:


The afterFinish is what I needed. Thanks.

The form in question has 2 inputs and it is the first one that I want
to get the focus on.

Thank you.

I didn't see anything in the scripy docs, but I've probably missed it.





--
Bill Drescher
william {at} TechServSys {dot} com

--
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-scriptacul...@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.



Re: [Proto-Scripty] Re: Setting the focus on an input after an effect to show the input.

2010-06-11 Thread Walter Lee Davis
Yes, but is there only one form on the entire page at any time? That's  
the point I was trying to get at here. If you have two inputs with the  
same ID, you can call focus() but only the first one with that ID will  
gain focus.


Walter

On Jun 11, 2010, at 4:57 PM, Richard Quadling wrote:


The afterFinish is what I needed. Thanks.

The form in question has 2 inputs and it is the first one that I want
to get the focus on.

Thank you.

I didn't see anything in the scripy docs, but I've probably missed it.


--
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-scriptacul...@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.



Re: [Proto-Scripty] Re: Setting the focus on an input after an effect to show the input.

2010-06-11 Thread Richard Quadling
On 11 June 2010 16:07, Walter Lee Davis  wrote:
> One question though -- is there only ever one $('requestVehicle') in the
> page? If you use the ID method to call an object like this, you are making
> that contract with the browser -- only one thing will ever match that
> selector.
>
> If there are many such, then don't give them IDs, or be sure to give them
> unique IDs, and then use a 'relative' lookup like maybe
>
> $('vsContainer').down('input.someClass').focus();
>
> As long as it's inside an anonymous function, that selector won't fire until
> the outer function is called, so it will be correctly populated (since
> you're in afterFinish and you know the div has been made visible).
>
> Walter
>
> On Jun 10, 2010, at 5:07 PM, Gregory Nicholas wrote:
>
>> it should be as follows:
>>
>> new Effect.Parallel(    [
>>       new Effect.Appear('banner',      {duration : 1.00, delay :
>> 0.50}),
>>       new Effect.Appear('vsContainer', {duration : 2.00, delay :
>> 0.50})
>>       ],
>>       {
>>               sync: true,
>>               afterFinish: function() {
>>                       $('requestVehicle').focus();
>>               }
>>       }
>> );
>>
>> --
>> 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-scriptacul...@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.
>>
>
> --
> 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-scriptacul...@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.
>
>

The afterFinish is what I needed. Thanks.

The form in question has 2 inputs and it is the first one that I want
to get the focus on.

Thank you.

I didn't see anything in the scripy docs, but I've probably missed it.
-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
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-scriptacul...@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.



Re: [Proto-Scripty] Re: Setting the focus on an input after an effect to show the input.

2010-06-11 Thread Walter Lee Davis
One question though -- is there only ever one $('requestVehicle') in  
the page? If you use the ID method to call an object like this, you  
are making that contract with the browser -- only one thing will ever  
match that selector.


If there are many such, then don't give them IDs, or be sure to give  
them unique IDs, and then use a 'relative' lookup like maybe


$('vsContainer').down('input.someClass').focus();

As long as it's inside an anonymous function, that selector won't fire  
until the outer function is called, so it will be correctly populated  
(since you're in afterFinish and you know the div has been made  
visible).


Walter

On Jun 10, 2010, at 5:07 PM, Gregory Nicholas wrote:


it should be as follows:

new Effect.Parallel([
   new Effect.Appear('banner',  {duration : 1.00, delay :
0.50}),
   new Effect.Appear('vsContainer', {duration : 2.00, delay :
0.50})
   ],
   {
   sync: true,
   afterFinish: function() {
   $('requestVehicle').focus();
   }
   }
);

--
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 
.




--
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-scriptacul...@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.