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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:47:24+00:00 2026-06-17T08:47:24+00:00

I am wanting to dynamically set the params in a remoteFunction within a check

  • 0

I am wanting to dynamically set the params in a remoteFunction within a check box. I have tried lots of different combinations I’ll show a couple below but I just recieve error like below…

so it basically my theory, in the scope of this method doesn’t have a clue what an eventInstance is

In FireBug error console I receive ReferenceError: eventInstance is not defined

Test Combination 1
<g:checkBox name='completed' value="${eventInstance.completed}"
    onclick="${remoteFunction(action:'update', id:eventInstance.id, params:'\'id=\' + eventInstance.id+\'&version=\' + eventInstance.version' , onComplete: "tester()" )}" />


Test Combination 2 
<g:checkBox name='completed' value="${eventInstance.completed}" evt="${eventInstance}"
    onclick="${remoteFunction(action:'update', id:eventInstance.id, params:"[version=evt.version, editType='occurrence', title=evt.title, startTime=start, endTime=end, isRecurring=evt.isRecurring, completed='true']", onComplete: "tester()" )}" /> 

This works if manually entering i.e. hard-coding the data in but this is no use. Something silly which I just can’t find the answer to 🙁

  • 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-17T08:47:24+00:00Added an answer on June 17, 2026 at 8:47 am

    OK for this to work … seems somewhat strange, you CAN NOT use grails variables i.e. sent from controller to use in GSP

    Instead … you HAVE TO save the variables into a JavaScript variable.

    So for each of the variables I wanted to use from the eventInstance to use in the params i.e. id, version, any other fields contained within I simply did the following:

    <script type="text/javascript">
        function tester() {
            $('#calendar').fullCalendar('refetchEvents');
        }
    
        var test0 = ${eventInstance.id};
        var test1 = ${eventInstance.version};
        var test3 ='${eventInstance.title}';
        var test4 = '${start}';
        var test5 = '${end}';
        var test6 = ${eventInstance.isRecurring};
        alert(test0 + test1 + test3 + test4 + test5 + test5 + 
    </script>
    

    then referenced these variables in the params section of the remoteFunction like follows:

    <g:checkBox name='completed' value="${eventInstance.completed}"
    onclick="${remoteFunction(action:'update', id:eventInstance.id, params:'\'id=\' + test0+\'&version=\' + test1+\'&editType=\'+"occurrence"', onComplete: "tester()" )}" />
    

    Not sure if this is some kind of bug or simply something wrong in my approach, however I have tried every single combination possible and seems the only work around solution I could come up with

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

Sidebar

Related Questions

I have a set of accordion panes(dynamically created) contained in an Accordion control. Basically,
I'm wanting to dynamically resize a CButton to the width of the text within
I am unable to set Pthread priority using pthread_attr_setschedparam() . I have tried to
I'm wanting to set the current time i my database My column is a
I have one program which takes a set of statements into a variable, and
I have a form in a backend module making use of some dynamically created
I'm trying to adapt Andy Langton's show/hide/mini-accordion ( http://andylangton.co.uk/jquery-show-hide ) to work within a
I'm wanting to set up a unittest TestCase where some of the cases are
What happens when I have the following situation: class A: holds on to dynamically
I'm wanting to dynamically create and query tables using Datamapper. While Datamapper allows you

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.