I'm having trouble retrieving 2 values and sending through load. I can retrieve the link data from the 'date' attribute but the input I can not retrieve to concatenate with the 'date' and do the right path. Follow the code.
Javascript:
$('.buscarr').click(function() {
var id = $(this).attr('campo1');
var id2 = $(this).attr('data');
alert(id);
console.log(id);
console.log(id2);
$("#cliente1").load($(this).attr(id2 + id));
});
HTML:
<div class="form-group">
<label for="busca">Nome Servico*:</label> <input id="campo1" type="text" class="form-control" placeholder="Insira um nome para busca">
</div>
<a href="#" data="/wbahd/servico_servlet?acao=buscar&busca=" class="btn btn-default btn-cadastrar-btn buscarr">Buscar</a>
</div>