How can ı do get value in Sweet Alert Poppup Message Content?

jquery

#1

I use JQUERY Datatable js and SweetAlert.js

There is a delete icon in datatable when click id get id and showing sweet alert confirm poppup . when click Yes it deleted fine working.

I want to get information about id’s = "TITLE"value to the warning message content

<tbody>
     <tr>
       <td class="kisa">@item.TITLE</td>
       <td>
         <a href="javascript:void(0);" onclick="deleteuser('@item.id')"><i class="fa fa-trash-o"></i></a>**
       </td>
     </tr>
 </tbody>

> My Sweet alert Js code This Point get need here (bold marked value) => text: " @TITLE are u want delete!"

function deleteuser(userid) {
    swal({
        title: "Are u sure?",
        text: "@TITLE are u want delete!",
        icon: "warning",
        buttons: {
            cancel: {
                text: "Hayır, iptal!",
                value: null,
                visible: true,
                className: "",
                closeModal: false,
            },
            confirm: {
                text: "Evet, sil!",
                value: true,
                visible: true,
                className: "",
                closeModal: false
            }
        }
    })

#2

https://sweetalert.js.org/

https://www.datatables.net/


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.