# Text\_field\_with\_auto\_complete

**URL:** <https://www.ruby-forum.com/t/text-field-with-auto-complete/153808>\
**Category:** Rails\
**Created:** [November 21, 2008, 10:17am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/153808 "2008-11-21T10:17:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [November 21, 2008, 10:17am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/153808/1 "2008-11-21T10:17:34Z")

</div>

Hi,  
I have text\_field\_with\_auto\_complete , The problem i faced here is  
when type the text like “firstname&lastname”.When i get value of text  
field in controller i only get the firstname. i couldn’t get text  
value after ‘&’ symbol. i guess the & symbol is the problem here. but i  
need to use the & symbol in my text. How can i overcome this. can any  
one please tell me.how can i over come this issue.

---

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [November 21, 2008, 11:54am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/153808/2 "2008-11-21T11:54:46Z")

</div>

On 21 Nov 2008, at 09:17, Palani K. wrote:

> Hi,  
> I have text\_field\_with\_auto\_complete , The problem i faced here is  
> when type the text like “firstname&lastname”.When i get value of text  
> field in controller i only get the firstname. i couldn’t get text  
> value after ‘&’ symbol. i guess the & symbol is the problem here.  
> but i  
> need to use the & symbol in my text. How can i overcome this. can any  
> one please tell me.how can i over come this issue

Probably the same problem that observe\_field used to have (see the  
last section here:  
[:with or :without you: link\_to\_remote's mysterious parameter - Space Vatican](http://www.spacevatican.org/2008/5/17/with-or-without-you-link_to_remote-s-mysterious-parameter))

Fred

---

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [November 21, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/153808/3 "2008-11-21T16:08:03Z")

</div>

Frederick C. wrote:

> On 21 Nov 2008, at 09:17, Palani K. wrote:
> 
> > Hi,  
> > I have text\_field\_with\_auto\_complete , The problem i faced here is  
> > when type the text like “firstname&lastname”.When i get value of text  
> > field in controller i only get the firstname. i couldn’t get text  
> > value after ‘&’ symbol. i guess the & symbol is the problem here.  
> > but i  
> > need to use the & symbol in my text. How can i overcome this. can any  
> > one please tell me.how can i over come this issue
> 
> Probably the same problem that observe\_field used to have (see the  
> last section here:  
> [:with or :without you: link\_to\_remote's mysterious parameter - Space Vatican](http://www.spacevatican.org/2008/5/17/with-or-without-you-link_to_remote-s-mysterious-parameter))
> 
> Fred

Hi fred,  
I follow the suggestion the site you given. here is the coding  
in my view.how can i change the my coding according to the site  
suggestion.

link\_to\_remote(“Find”, :url =\> {:controller =\> ‘account’, :action =\>  
“findyourgame”},:with =\>“‘game[title]=’+$(‘game\_title’).value”)%\>

---

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [November 21, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/153808/4 "2008-11-21T16:13:17Z")

</div>

On 21 Nov 2008, at 15:08, Palani K. wrote:

> > > value after ‘&’ symbol. i guess the & symbol is the problem here.
> 
> Hi fred,  
> I follow the suggestion the site you given. here is the coding  
> in my view.how can i change the my coding according to the site  
> suggestion.

The important bit is the bit about encodeURIComponent

Fred
