I have this input I want to use in another controller:
<li><input type="text" placeholder="Buscar" id="idnavBusqueda" name="navBusqueda"></li>
<li><a href="#" onclick="guardar()">Buscar</a></li>
And For that I use the method guardar():
function guardar() {
console.log("HOLAAAAAAAAAAAAAAAA");
var userAmigo= document.getElementById("idnavBusqueda");
$('#idnavBusqueda').load("/perfilBusqueda",{navBusqueda: userAmigo});
}
But everytime I hit the "Buscar" button, Chrome sends the error and it just redirects to the href on "buscar". Also I'm using Spring, if that's relevant. What is wrong?
Aucun commentaire:
Enregistrer un commentaire