jquery Post problem
<p>I have a code in which i am sending the values from a form to php page where the query lies and for sending the values i am using $.post of jquery everything is going good. I am resulting a table and a button now i want that button will work and 1 of the table column has the radio button list so i want that button will take the radio id of that perticular row on click but my button is not working so please guide me how i can do this my code is here</p>

<pre><code>my javascript function

function searchDetail(searchName) {
    var textName = searchName + "Text";
    var inputText = $('#' + textName).val();
    var formName = searchName + "Form";
    if (inputText === "") {
        $('#' + textName).css("border", "2px solid red").fadeIn(4000);
    }
    else {

        $('#' + textName).css("border", "1px solid #8dd7f6").show(2000);
        $('#searchBox').fadeIn(1000);
        $.post('../search/delete' + searchName + '.php', $('#' + formName).serialize(), function(result) {
            $('#searchBox').html(result);
        })
    }
}
</code></pre>

<p>my php code</p>

<pre><code>if ($count == "0") {
    echo "There is no data with $search = ".$searchKeyword;
} else {
    $color = 2;
    echo "&lt;table cellspacing='0px' cellpadding='7px'&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;#&lt;/th&gt;&lt;th&gt;book Id&lt;/th&gt;&lt;th&gt;book Name&lt;/th&gt;&lt;th&gt;book Writer&lt;/th&gt;&lt;th&gt;book Price&lt;/th&gt;&lt;th&gt;Availability&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;";
    while ($row = mysqli_fetch_array($result)) {
        $checkBook = $row['booktotal'] - $row['bookremain'];
        if ($checkBook == 1) {
            $status = "Yes";
        } else {
            $status = "No";

        }

        if ($color % 2 == 0) {
            echo "&lt;tr class='even'&gt;&lt;td&gt;&lt;input type=radio name=group1 value=".$row['bookId']."&gt;&lt;/td&gt;&lt;td&gt;".$row['bookId']."&lt;/td&gt;&lt;td&gt;".$row['bookName']."&lt;/td&gt;&lt;td&gt;".$row['bookWriter']."&lt;/td&gt;&lt;td&gt;".$row['bookPrice']."&lt;/td&gt;&lt;td&gt;".$status."&lt;/td&gt;&lt;/tr&gt;";
            $color = $color + 1;
        } else {
            echo "&lt;tr class='odd'&gt;&lt;td&gt;&lt;input type=radio name=group1 value=".$row['bookId']."&gt;&lt;/td&gt;&lt;td&gt;".$row['bookId']."&lt;/td&gt;&lt;td&gt;".$row['bookName']."&lt;/td&gt;&lt;td&gt;".$row['bookWriter']."&lt;/td&gt;&lt;td&gt;".$row['bookPrice']."&lt;/td&gt;&lt;td&gt;".$status."&lt;/td&gt;&lt;/tr&gt;";
            $color = 2;
        }

    }
    echo "&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;input type=button value=Delete id=deleteButton onclick='check()'&gt; &lt;script type=text/javascript&gt; function check(){alert(Hello);}&lt;/script&gt;";

    mysqli_close($con);
}


?&gt;
</code></pre>

<p>my html code</p>

<pre><code>&lt;body&gt;
    &lt;div id="deleteFormTable"&gt;
        &lt;span id="headerFont"&gt;Enter Information to Delete Book&lt;/span&gt;&lt;br&gt;&lt;br&gt;
        &lt;form id="bookSearchForm" name="bookSearchForm"&gt;&lt;label&gt;Search Book:&lt;/label&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="text" id="bookSearchText" name="bookSearchText"/&gt;&amp;nbsp&lt;select id="bookSearchOption" name="bookSearchOption"&gt;&lt;option id="bookSearchId"&gt;Id&lt;/option&gt;&lt;option id="studentSearchName"&gt;Name&lt;/option&gt;&lt;/select&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="button" value="Search" id="bookSearch" name="bookSearch" onclick="searchDetail(this.id)"&gt;&lt;/form&gt;
    &lt;/div&gt;
    &lt;div id="searchBox"&gt;
        &lt;center&gt;&lt;div id="searchLoadBox"&gt;&lt;img src="../images/loadings.gif" alt="..."&gt;&lt;/div&gt;&lt;/center&gt;
    &lt;/div&gt;
&lt;/body&gt;
</code></pre>
