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

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

#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

DATATABLE

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

> SWEETALERT CODE This Point get need here (bold marked value) => text: " @TITLE are u want delete! id title text should come here

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

Can you post a link to your entire code (Codepen, JSFiddle, or github)? It would make it easier for use to help you.


#3

Hard Process for me sample create here because ı can’t use anytime codepen etc.