Forum: Ruby on Rails text_field_with_auto_complete

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Palani K. (Guest)
on 2008-11-21 11:17
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.
Frederick C. (Guest)
on 2008-11-21 12:54
(Received via mailing list)
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:
http://www.spacevatican.org/2008/5/17/with-or-with...)

Fred
Palani K. (Guest)
on 2008-11-21 17:08
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:
> 
http://www.spacevatican.org/2008/5/17/with-or-with...)
>
> 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")%>
Frederick C. (Guest)
on 2008-11-21 17:13
(Received via mailing list)
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
This topic is locked and can not be replied to.