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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:06:35+00:00 2026-05-28T04:06:35+00:00

I face a problem using Grails 2 submitToRemote tag. The following code is what

  • 0

I face a problem using Grails 2 submitToRemote tag.

The following code is what I use in the controller:

def getProposal = {
    def layouts = importService.getLayoutsFor(params.product as int)
    render(contentType: "text/xml") {
        for (layout in layouts) {
            option("${layout}")
        }
    }
}

and in the GSP:

<g:submitToRemote action="getProposal" update="layouts"
    onLoading="showProgress();" onComplete="hideProgress();"
    value="Do It" />
<select id="layouts" name="layout" required="">
</select>

Using jquery this results in:

showProgress();;jQuery.ajax({type:'POST',data:jQuery(this).parents('form:first').serialize(), url:'/app/controller/getProposal',success:function(data,textStatus){jQuery('#layouts').html(data);},error:function(XMLHttpRequest,textStatus,errorThrown){},complete:function(XMLHttpRequest,textStatus){hideProgress();}});return false

which not works and returns am error:

Node cannot be inserted at the specified point in the hierarchy

But if I use another render method like:

render(status: 0, text: "<option value='1'>Layout 1</option>")

it works.

In both cases the expected answer is transmitted back.

I did not understand why it will not work with the first nicer method. Could anyone explain what I do wrong?

Thx

Edit:

I noted that if I use render(contentType: “text/text”) instead it will work. May be it has something to do, that the xml is not properly formatted (no root node?). But why does it work in Grails 1.3.7?

  • 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-05-28T04:06:36+00:00Added an answer on May 28, 2026 at 4:06 am

    Grails 1.3.7 had a different default javascript provider (prototype). The jquery ajax call trys to infer the type of the response based on what it receives

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

Sidebar

Related Questions

I face a problem in using AbstractTableModel, i use linked list as a container
I face the following strange problem while using JFileChooser package sandbox; import java.io.File; import
I get an orientation problem while using the following to code to display a
I face the following problem function book($memberid, $classid){ if (!book){ // update the db
I'm using Wicket + EJB3 in an application and I face a problem but
I face the following problem in a cryptographical application: I have given a set
I'm having a strange problem while using @font-face on IE9. I converted a TTF
I've encountered a problem using @font-face while building a website. The font's installed on
Im using my GAE application on my phone. I face a problem in getting
I face a problem when using QueryElevation . I want to split the elevation

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.