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 9176725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:10:22+00:00 2026-06-17T17:10:22+00:00

I have an ajax that is successfully passing things into my controller var ids

  • 0

I have an ajax that is successfully passing things into my controller

var ids = grid.jqGrid('getGridParam','selarrrow');
if (ids.length>0) {
    var names = [];
    for (var i=0, il=ids.length; i < il; i++) {
        var name = grid.jqGrid('getCell', ids[i], 'uniqueIdentifyingName');
        names.push(name);
    }
}

Then I created an alert that spits this out so I know they are in there:

"alex's names: other test,test"

Now I would like to pass as data.

I am currently passing them using ajax using

data: {'names':JSON.stringify(names)},
dataType: 'json'

But I can’t parse it in the grails controller

I am currently doing this:

List<JSON> Mynames = JSON.parse(params.names)
Mynames.each{println "MY name is: $Mynames"}

Which is outputting:

MY name is: [other test, test]
MY name is: [other test, test]

How can I parse this?

  • 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-17T17:10:23+00:00Added an answer on June 17, 2026 at 5:10 pm

    Instead of printing the whole Mynames object in each iteration, print out the current item using it

    Mynames.each{ println "MY name is: $it" }

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

Sidebar

Related Questions

I have an Ajax.ActionLink that successfully calls my controller action but instead of updating
I have an ajax call that successfully calls a page that by itself works
I have ajax request that do 3 missions: Save Model (DB) Send Email Give
I have an Ajax request that can return more than one valid value, so
I have an ajax application that uses hashbanging for navigation and I keep track
I have an Ajax form that updates a div when submitted with a submit
I have a AJAX request that will return a string that contains some HTML
I have an ajax call that fires multiple times but is called once. function
I have a Ajax request that fires on clicking a href that is part
I currently have a ajax script that dynamically builds two select boxes enabled with

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.