Reputation: 61
<script>
$(document).ready(function(){
$("#tender").on("change",function(){
var data = $("#tender").val();
$.ajax({
url : "tender.php",
data : {type: data,total: <?php echo $realfinaltotalprice ?>},
type : 'post',
success : function(result){
$("#tenderHint").val(result);
}
});
});
});
</script>
I am trying to get the result in inner html. I tried with $("#tenderHint").val(result);
to $("#tenderHint").innerHTML(result);
but it is not working. How can I make inner html work on this AJAX code. Thanks in advance.
Upvotes: 1
Views: 173
Reputation: 2918
$("#tenderHint").html(result);
Upvotes: 0
Reputation: 24916
Use html
method Just change
$("#tenderHint").val(result);
to
$("#tenderHint").html(result);
Upvotes: 3