[I hate top-posting, but that seems to the the norm here]

Use 'informal' [1]

Make your ajax call return
<li><span class='informal'>Ada Noel</span><span
class='hide'>[EMAIL PROTECTED]</span</li>
etc.

Then have a CSS rule
span.hide {display:none}

The CSS will ensure that only the name is displayed to the user, but
the Ajax.Autocomplete takes only the text which is NOT in a span with
class 'informal', and so will take only the email address.

Colin


[1]: http://github.com/madrobby/scriptaculous/wikis/ajax-autocompleter,
section 'Server return'


On Oct 30, 6:41 am, srid <[EMAIL PROTECTED]> wrote:
> Hello
>
> In the To field when you type the letter 'a', the first item in the
> drop down list is the Ada Noel, how do I capture the e-mail address,
> basically I want to set a hidden field in the form with the email
> address selected.
>
> thanks in advance
> Sridhar

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to