skip to Main Content

Duplicate ajax requests when clicking a button – Jquery ajax

I have the following function to open the popup. When the confirm button is clicked, it will process the request function OpenConfirmPopup(title, msg, func) { var mymodal = $('#confirmModal'); mymodal.find('.modal-title').text(title); mymodal.find('.modal-body').text(msg); mymodal.modal('show'); $('.btn-confirm').click(function () { var args = new Array();…

VIEW QUESTION

What is wrong with the click request? – Jquery ajax

I want to send a ajax post request to the page when clicked.My code $(document).on('click', '#datadel', function(num) { $.ajax({ url:'https://localhost/ajax/ajax_img.php?act=datadel', type: 'POST', data: {'num':num}, success: function(infa){ $('#img-loag-scrin').html(infa); } }); }); html code <span id="datadel" class="sf_button_red" value="50">O`chirish</span> then the value in…

VIEW QUESTION
Back To Top
Search