Does anyone know how to initiate a POST request in a Grails applications using javascript. Specifically, I would like to be able to POST when a the selected item in a drop-down box is changed.
I've tried using jQuery and the $.post() method. It successfully calls my controller action, but I'm not sure how to get the page to refresh with the response contents. The screen is not updated. Any ideas? This does not need to be asynchronous.
I'm not tied to using jQuery, I'm just trying to figure out how to do a POST from a javascript.
Andrew
My client-side javascript
<script type="text/javascript" language="javascript">
$(document).ready( function() {
$("#ownerId").change(function() {
$.post("/holidayCards/clientContact/ownerSelected", {ownerId: this.value});
});
});