How do I call a jQuery function after the data is successfully post and display. Example is as below,
<script>
$(document).ready(function(){
$("#pr_no").change(function(){
var pr_no = $('#pr_no').val();
$.post('../view-detail-purchase-pdf.php',
{
pr_no : pr_no
}, function(data) {
$('#result').html('<a href="../view-detail-purchase-pdf.php?pr_no=' + pr_no + '" class="popupwindow">' + pr_no + '</a>');
})
});
});
</script>
On the $('#result')
div
is a link that enable a pop up window if click using a jQuery plugin that have the class="popupwindow"
. How do I make it work.