单击复选框时停止触发功能

I am using jquery to print the following table. Table has two columns. one for the values and other for the check boxes. Problem I am facing is when I click a checkbox, it is triggering the function which is supposed to be triggered only when the value clicked.

Can somebody tell me how to stop triggering the function when a check box is clicked?

PHP code that prints the table

<table border='1' cellspacing='12' cellpadding='4' style='border-collapse: collapse' width='700' id=topictable >

<?php while ($row = mysql_fetch_assoc($results)) {
    $topic = $row['topic']; 
?>
<tr bgcolor='white'>
<td class='value'><a href='#'><?php $topic ?></a></td>
<td bgcolor='white'width='5%'><input type=checkbox name=chekboxTopic[] value= <?php $topic ?> </td>
</tr>
<?php
}
?>
</table>

Java script

$(document).on("click","#topictable td", function() {
    // to set the session variable`enter code here`
    var strSelectedTopic = ($( this ).text());
    alert(strSelectedTopic);
    var switchval = "setsessiontopic";
     var param = "switchval=" + switchval + "&topic=" + strSelectedTopic;
     ajaxSend(param);
    var form = document.getElementById("abcd");
    form.action = "design.php"
    form.target = "_blank";
    form.submit();
    return false;

});

Couple things.

  1. Close off your inputs
  2. Change what is supposed to be clicked; make it more specific

Demo: http://jsfiddle.net/dL3s3acn/

<table border='1' cellspacing='12' cellpadding='4' style='border-collapse: collapse' width='700' id=topictable >
<?php
    while ($row = mysql_fetch_assoc($results)) {
        $topic = $row['topic'];
?>
    <tr bgcolor='white'>
        <td class="value"><a href="#"><?php $topic ?></a></td>
        <td bgcolor="white" width="5%"><input type="checkbox" name="chekboxTopic[]" value="<?php $topic ?>" /></td>
    </tr>
<?php
    }
?>
</table>
<script>
// Click on the class ".value" not "td", that is too broad
$(document).on("click","#topictable .value", function() {
    // to set the session variable`enter code here`
    var strSelectedTopic = ($(this).text());
    alert(strSelectedTopic);
    var switchval   =   "setsessiontopic";
    var param       =   "switchval="+switchval+"&topic="+strSelectedTopic;
    ajaxSend(param);
    var form        =   document.getElementById("abcd");
    form.action     =   "design.php"
    form.target     =   "_blank";
    form.submit();
    return false;
});
</script>