Komil 0 Newbie Poster

Good days guys,

in my main.php page I select data from mysql db and then if selected on any rows send data to ajax script, so everything is ok but when I click in any rows I receive one data.

<table cellpadding="0" cellspacing="0" border="0" class="display mobile_dt1 dt2">

<thead>
       <tr>
       <th class="essential">Звук</th>
       <th class="essential">Время звонка</th>

       </tr>
       </thead>
       <tbody>
       <?php


       $stmt = "SELECT a, b, u FROM asteriskdb.cdr ORDER BY calldate desc";
       $result = mysql_query( $stmt, $conn );
       while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
       $src= $row['b];

       ?>
   <tr class="gradeX">
   <td><a href="http://localhost/voice/<?php echo $row['u'];?>.wav" class="sm2_button"></a></td>
   <td><?php echo $row['a'];?></td>
   <td><span id="someVal"><?php echo $src; ?></span></td>
   <td>
   <a href="#" class="sepV_a fd2" title="Change"><img src="img/ico/pencil_gray.png" alt="" /></a>
   <a href="#" class="sepV_a chist" title="View"><img src="img/ico/preview_gray.png" alt="" /></a>
   <!--a href="#" title="Del"><img src="img/ico/trashcan_gray.png" alt="" /></a-->
   </td>

and my JS script

<script>
                                            var name="<?php echo $src; ?>"
                                            $(document).ready(function() {
                                                //* common functions
                                                prth_common.init();
                                                prth_dialogs.init();
                                                if(!jQuery.browser.mobile) {
                                                    //* collapsible sideabar
                                                    prth_sidebar.init();
                                                }

                                                // sticky footer
                                                prth_stickyFooter.init();
                                                $("html").removeClass("js");
                                                if(!jQuery.browser.mobile){
                                                                 prth_datatable.dt1();
                                                                 prth_datatable.dt2();
                                                                 prth_datatable.ct();
                                                                 prth_datatable.dt_actions();
                                                                 prth_datatable.dte_1();
                                                                 prth_datatable.dte_2();
                                                                 }else{
                                                                 prth_datatable.mobile_dt();
                                                                 };


                                            });
                                        </script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.