Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make verification message alert by jquery
    primarykey
    data
    text
    <p>i have this code for view cats of my script</p> <pre><code>&lt;table align="center" width="100%" cellpadding="0" cellspacing="0" border="0"&gt; &lt;td class="td1" width="70%" align="center"&gt;title&lt;/td&gt; &lt;td class="td2" width="30%" align="center"&gt;Delete&lt;/td&gt; &lt;/tr&gt; &lt;?php $select_cats = $mysqli-&gt;query("SELECT * FROM cats"); $num_cats = $select_cats-&gt;num_rows; while ($rows_cats = $select_cats-&gt;fetch_array(MYSQL_ASSOC)){ $id_cat = $rows_cats ['id']; $title_cat = $rows_cats ['title']; ?&gt; &lt;tr rel="&lt;? echo $id_cat; ?&gt;"&gt; &lt;td class="td1" width="70%" align="center"&gt;&lt;a class="link2" href="../cat-&lt;? echo $id_cat; ?&gt;.html" target="_blank"&gt;&lt;? echo $title_cat ; ?&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="td2" width="30%" align="center"&gt; &lt;a rel="&lt;? echo $id_cat; ?&gt;" class="deletecat" href="#"&gt;Delete Cat&lt;/a&gt; &lt;span class="loading" rel="&lt;? echo $id_cat; ?&gt;"&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;? } ?&gt; </code></pre> <p></p> <p>and i use this jquery code for delete cat</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $(".deletecat") .click(function(){ var id_cat = $(this).attr('rel'); var s = { "id_cat":id_cat } $.ajax({ url:'action/delete_cat.php', type:'POST', data:s, beforeSend: function (){ $(".loading[rel="+id_cat+"]") .html("&lt;img src=\"../style/img/load.gif\" alt=\"Loading ....\" /&gt;"); }, success:function(data){ $("tr[rel="+id_cat+"]") .fadeOut(); } }); return false; }); }); &lt;/script&gt; </code></pre> <p>i want to make verification message in dialog box by <code>alert();</code> has two options if click Yes do jquery code and if click no close dialog box</p> <p>thanks </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload