2

I have a cool bit of dojo running where I click a button and it brings a success message on the screen via JavaScript. Is it possible to issue a call to a server-side Groovy script (eg. foo.groovy) from within this JavaScript?

Not only do I want to show the cool success message, but I need to do some work in the background at that point also.

2 Answers 2

2

Here are some relevant links from the Dojo documentation:

  • Intro to AJAX and Dojo
  • Dojo.xhrGet() reference: sends a GET request to the server-side resource (which can be a Groovy script or anything else that resides on the server). The live examples on this page are currently broken, but I'm told this is being resolved.
  • Dojo.xhrPost() reference: sends a POST request. There are variants for PUT and DELETE too.
Sign up to request clarification or add additional context in comments.

Comments

0

The answer was to use dojo's AJAX call system.

1 Comment

It would be nice, if you would post some example code snippets of your solution, to give others an idea how this can be achieved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.