I am new in javascript/Jquery and php.I am displaying contents of a table in php. When I select a checkbox I called a function change. Now I have to do disable all checkboxes except selected checkbox. what parameter should be pass through change function ?What will I have to do in change function so that I can get desired output?
<div class = "auto_hi_wid " style = "margin-left:10px" id = "generate_shipment">
<table border = '2' style="width:100%">
<thead>
<tr class = "odd">
<th scope = "col" abbr ="RouteName"width = "0%">RouteName</th>
<th scope = "col" abbr ="StartLocation"width = "60%">StartLocation</th>
<th scope = "col" abbr ="EndLocation"width = "20%">EndLocation</th>
<th scope = "col" abbr ="StartTime"width = "10%">StartTime</th>
<th scope = "col" abbr ="EndTime"width = "10%">EndTime</th>
<th scope = "col" abbr ="SelectBox"width = "10%">SelectBox</th>
</tr>
</thead>
</table>
<?php
if (sizeof($bookmarked_route) == 0) {
echo '<br><div style="text-align:center;font-size:200%;">No Results </div>';
}
else {
$start_time = "00:00";
echo "<table>\n";
foreach ($bookmarked_route as $route) {
$route1 = json_decode($route['route_info'], true);
if (isset($route['route_name'])) {
echo "<tr>\n".
"<td>{$route['route_name']}</td>\n".
"<td>{$route1['start_location']}</td>\n".
"<td>{$route1['end_location']}</td>\n".
"<td>{$start_time}</td>\n".
"<td>{$route1['vehicle_engine_time_in_sec']}
</td>\n".
"<td><input type=\"checkbox\" name=\"checkbox\"
value=\"\"id=\"checkbox_{$route['route_name']}\"onclick=\"change()\"></td></tr>";
}
}
echo "</table>";
}
?>
</div>
function change(){}
Aucun commentaire:
Enregistrer un commentaire