Pass value from href jquery to Spring MVC

2

Good afternoon, I'm having trouble passing an id that is in the jquery href to the Spring MVC controller update method. Can anybody help me. Thank you.

$.ajax({
        url : "listAllForum",
        dataType : 'json',
        success : function(data) {
            $.each(data, function(index, objeto) {
                $('#post-forum').last().append('<div class="jumbotron"> <strong>Nome do usuário que postou a mensagem!!!</strong> - ' 
                        +' Data: <br>' + objeto.message + '<br> <br>'
                        + '<input type="text" size="90" placeholder="Redigir uma resposta" id="answer" name="answer" />'
                        + ' <br> <br> <a href='**/update/**' + objeto.idForum + '>Responder</a> </div>');
                });
        }
    });

When clicking on Reply, instead of calling the controller method, it calls an update page.

    
asked by anonymous 04.04.2017 / 19:35

0 answers