Hi Nomad,

> Your solution to #1 works provided that I change the ID of the newly
> appended input box.
> ...
> I am thinking there must be a way that I
> can keep the ID the same for every appended input box and set focus to
> the last input box.

You can use the ID as it is, no need to change it.  From your latter
comment above, it almost sounds like you're trying to append multiple
copies of an input box that all have the same ID to the document, and
then find the last of those.  Apologies if I'm misunderstanding that,
but if that's what you're trying to do, you can't -- the ID of an
element must be unique within the document.[1]  Names can be non-
unique, but IDs must be unique.  So if you have this markup for the
input box:

<input type='text' id='mythingy' size='10' />

You can only append that to the document *once*, because IDs must be
unique.

[1] http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2

FWIW,
--
T.J. Crowder
tj / crowder software / com

On Dec 30, 4:30 am, Nomad <[email protected]> wrote:
> Diodeus,
>
> First of all, thanks for the input. I really appreciate it.
>
> Your solution to #1 works provided that I change the ID of the newly
> appended input box. That is a simple task to do in my server.php
> script. The problem then becomes that my other scripts that monitor
> the input box kepresses no longer works because the ID has changed. My
> CSS styles are now also lost. I am thinking there must be a way that I
> can keep the ID the same for every appended input box and set focus to
> the last input box. I am looking for the solution that may find the
> last input box named 'iBox'. I am thinking that somehow I can create
> an array of input boxes, get the array count, and then set focus to
> the last one. I am just tossing out ideas as I type. Being new to
> prototype I will check out the help file for more information.
>
> I haven't tried solution # 2 yet. I want to find a solution for #1
> first.
>
> Nomad
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to