2
Good afternoon guys, I am having trouble passing an id that is in the jquery href for Spring MVC controller update method. Someone could 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 I click Reply instead of calling the controller method, it calls an update page.