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

  • Home
  • SEARCH
  • 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 7188913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:11:24+00:00 2026-05-28T19:11:24+00:00

I am trying to use Ajax asynchronous call backs with grails. In my gsp

  • 0

I am trying to use Ajax asynchronous call backs with grails. In my gsp file head I have:

    <g:javascript library="prototype" />

in the body I have:

        <g:remoteLink controller="dashboard" action="showTime" update="time">Show the Time</g:remoteLink> 

    <div id="time"></div>

on my controller I have:

    def showTime = {
         System.print("time");
         render "The time is ";
}

I would expect that the div “time” in my gsp file would be replaced with the rendered text “The time is”. Instead, nothing seems to happen. I know that my controller fires, because of the System.print but nothing is updated in the div.

I noticed that onload of the page, I get this error generated: “element.dispatch is not an event” in the prototype.js page. If I remove

 <g:javascript library="prototype" />

I no longer get that error but the whole page is redirected to dashboard/showTime

What am I doing wrong here?

thanks
jason

  • 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-28T19:11:25+00:00Added an answer on May 28, 2026 at 7:11 pm

    Are you using both jquery (or some other JS library) and prototype libraries? This problem is usually caused by using BOTH jquery.js and prototype.js. You might not be seeing jquery being loaded (maybe it’s in the layout or in the < body >, check the JS libraries loaded using firebug.

    If you are loading both, comment out jquery and just use prototype. Check it again and it should be working, updating the < div >. I hope that helps.

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

Sidebar

Related Questions

I have been trying to use an ajax-style file upload component (like the dojox
So I am trying to use jQuery to insert data from an ajax call.
I'm trying to use Ajax to call a PHP script to write to two
I'm trying to use Ajax accordion and the telerik RadScriptmanager to have an AJAX
Hi jquery/javascript gurus, I am trying to use jquery ajax function to populate the
I'm trying to use AJAX (not jQuery).... I basically have this going on. Content
I'm trying to use AJAX with web2py language but I have a problem My
I'm trying to use Ajax of jQuery, I have this code below and although
I'm trying to use Ajax to fetch an HTML page and then pull out
I am currently trying to use AJAX in my application via jRails. I am

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.