Ajax with Grails 3 and jQuery

Posted on by Kim

<script type="text/javascript">
    

    $(document).ready(function(){
    $("#selectboxid").change(function () {
        $.ajax({
            url: "${g.createLink(controller:'ruleDefinition',action:'ajaxCall')}",
            dataType: 'json',
            data: {
            },
            success: function (data) {
                alert(data)
            },
            error: function (request, status, error) {
                alert(error)
            },
            complete: function () {
            }
        });
    });
    });
</script>


0 Responses to "Ajax with Grails 3 and jQuery":