Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8102565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:16:24+00:00 2026-06-05T23:16:24+00:00

I noticed something when I was attempting to use remoteField ajax tag in grails.

  • 0

I noticed something when I was attempting to use remoteField ajax tag in grails. When I enter an ampersand (&), that value is not recognized in my controller when obtaining the parameter value.

Example: I will type Cat & Dog
What I see: Cat

How can I avoid this? Is this a known bug? I couldn’t find anything online about this.

Edit

I’m pretty sure this is due to url encoding and parameters, since an ampersand is usually a parameter delimiter. Just not sure how to get around this.

<g:remoteField action="getName" update="testDiv" paramName="search" name="nameSearchResults" value="" />

Controller:

def getName() {
    println "Search result = " + params.search
    //When typing "Cat & Dog" I get:
    //Search result = C
    //Search result = Ca
    //Search result = Cat
    //Search result = Cat 
    //Search result = Cat
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:16:25+00:00Added an answer on June 5, 2026 at 11:16 pm

    Have you tried URL encoding the text in your remoteField?

    I would recommend adding a before property with JavaScript to URL encode the input:

    <g:remoteField action="getName" update="testDiv" paramName="search" name="nameSearchResults" value="" before="encodeURIComponent(this.value); return true;" />
    

    You will then have to decode it in the controller.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed something when I was attempting this today: <g:remoteField action=getReportsToResults update=reportsToResultsDiv paramName=search name=reportsToResults
I've just noticed something that I'd never noticed before, while working on a (regular,
I noticed something with SubSonic 2.x that I'm sure others have run into... Calling
I've noticed something funny Java does (or at least Netbeans) when I use classes
I noticed something interesting while testing the client side validation on a website that
I noticed something odd today. I have an application that writes/read data to a
I have noticed something that I cannot understand at all. I am doing something
Just noticed something that looks strange to me. Visual C++ doesn't align object in
I noticed something that seems odd in the following code: MatchCollection mc = Regex.Matches(myString,
I noticed something in C# when dealing with custom objects that I found to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.