[Proto-Scripty] Re: appending to page and changing focus to the new input box in that

2008-12-30 Thread Diodeus

As T.J. said, each ID should be unique.

Alternately you can do this the old-fashioned DOM way:

document.yourformname.yourelement.focus()

On Dec 29, 11:30 pm, Nomad  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 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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Custom attributes or not custom attributes ?

2008-12-30 Thread buda

But to store metadata in objects - is doing overjob - elements might
be added or deleted or changed their style or state - and syncronyze
elmenets state with their object mappers - is very hard and
useless

On 30 дек, 14:17, RobG  wrote:
> On Dec 29, 8:38 pm, buda  wrote:
>
> > > It is useful, but I don't think it's worth the trouble and I
> > > personally don't use it. IE's DOM is one example of what makes custom
> > > attributes troublesome - you never know which issues you will run into
> > > due to every custom attribute ending up as a property of an element.
> > > What if attribute name (which becomes a property name) is a reserved
> > > word (according to ECMAScript/JScript)? What if it corresponds to some
> > > IE's proprietary element property? Which of them takes precedence and
> > > which issues it might cause? etc.
>
> > I completle confused at finally - where to store elements metadata?
>
> DOM elements are designed to provide a user interface, they shouldn't
> be used as business objects or to implement business logic.
>
> > What is the best way?
>
> Use javascript objects, use DOM elements and events to interact with
> the user.
>
> --
> Rob
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Custom attributes or not custom attributes ?

2008-12-30 Thread RobG



On Dec 29, 8:38 pm, buda  wrote:
> > It is useful, but I don't think it's worth the trouble and I
> > personally don't use it. IE's DOM is one example of what makes custom
> > attributes troublesome - you never know which issues you will run into
> > due to every custom attribute ending up as a property of an element.
> > What if attribute name (which becomes a property name) is a reserved
> > word (according to ECMAScript/JScript)? What if it corresponds to some
> > IE's proprietary element property? Which of them takes precedence and
> > which issues it might cause? etc.
>
> I completle confused at finally - where to store elements metadata?

DOM elements are designed to provide a user interface, they shouldn't
be used as business objects or to implement business logic.


> What is the best way?

Use javascript objects, use DOM elements and events to interact with
the user.


--
Rob
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---