Re: autocomplete with id and value

2009-12-12 Thread djogo

I added some attributes to the li tag, so the callback function
would access them.

For instance

li my_id=33is it a hack?/li

Then i use getAttribute to access it.

I made a lot of this to replace huge select boxes, but if you ask me,
I'd advise otherwise, because on production with a lousy network, the
autocomplete is so slow and unresponsive. Users actually asked for the
select boxes back!

Dfcp

On 11 dez, 20:51, paulinthought paulgrat...@gmail.com wrote:
 Hi,
 I have autocomplete working fine, it passes the value of the selected
 field back to the controller once I post it but I can't guarantee the
 values in my list will be unique so I need to identify each with an id
 and pas that back to the controller also.  I've found some samples
 which involve putting the id and the value into the display list.
 There must be a more elegant way to do this!
 Can anyone help?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: autocomplete with id and value

2009-12-12 Thread paulinthought
Will bear it all in mind. Thanks for taking the time to reply djogo
and robustsolution.

On Dec 12, 12:40 pm, djogo djogopat...@gmail.com wrote:
 I added some attributes to the li tag, so the callback function
 would access them.

 For instance

 li my_id=33is it a hack?/li

 Then i use getAttribute to access it.

 I made a lot of this to replace huge select boxes, but if you ask me,
 I'd advise otherwise, because on production with a lousy network, the
 autocomplete is so slow and unresponsive. Users actually asked for the
 select boxes back!

 Dfcp

 On 11 dez, 20:51, paulinthought paulgrat...@gmail.com wrote:

  Hi,
  I have autocomplete working fine, it passes the value of the selected
  field back to the controller once I post it but I can't guarantee the
  values in my list will be unique so I need to identify each with an id
  and pas that back to the controller also.  I've found some samples
  which involve putting the id and the value into the display list.
  There must be a more elegant way to do this!
  Can anyone help?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


autocomplete with id and value

2009-12-11 Thread paulinthought
Hi,
I have autocomplete working fine, it passes the value of the selected
field back to the controller once I post it but I can't guarantee the
values in my list will be unique so I need to identify each with an id
and pas that back to the controller also.  I've found some samples
which involve putting the id and the value into the display list.
There must be a more elegant way to do this!
Can anyone help?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: autocomplete with id and value

2009-12-11 Thread robustsolution
the idea about autocomplete is for listing values with or without
relevance not with or without ids.
otherwise a hack should be done.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en