$(document).ready(function () {
$('#deleteProductModal').on('show.bs.modal', function (event) { // id of the modal with event
var button = $(event.relatedTarget) // Button that triggered the modal
var productid = button.data('productid') // Extract info from data-* attributes
var productname = button.data('productname')
var title = 'Confirm Delete #' + productid
var content = 'Are you sure want to delete ' + productname + '?'
var content1 = '<label for="message-text" class="form-control-label">Work Order:</label><textarea class="form-control" id="message-text"></textarea>';
// Update the modal's content.
var modal = $(this)
modal.find('.modal-title').text(title)
modal.find('.modal-body').html(content1)
// And if you wish to pass the productid to modal's 'Yes' button for further processing
modal.find('button.btn-danger').val(productid)
})
})