2
Answers

How to get checkbox status and data value [MVC]

Bryan Gomez

Bryan Gomez

7y
153
1
How to get the checkbox status and data value from my table in HTML? I want to get the @myJob.so_no.
 
Here's my view:
  1. <table class="table table-striped table-hover table-condensed" id="myJobTable">  
  2.                     <thead class="thead-dark">  
  3.                         <tr>  
  4.                             <th scope="col">#</th>  
  5.                             <th scope="col"></th>  
  6.                             <th scope="col">Date</th>  
  7.                             <th scope="col">SO No</th>  
  8.                             <th scope="col">Serial</th>  
  9.                             <th scope="col">Status</th>  
  10.                             <th scope="col">Technician</th>  
  11.                         </tr>  
  12.                     </thead>  
  13.                     @foreach (MyJobAllocation myJob in Model.MyJob)  
  14.                     {  
  15.                         <tr>  
  16.                             <td>@myJob.row</td>  
  17.                             <td>  
  18.                                 <input type="checkbox" id="chk" />  
  19.   
  20.                             </td>  
  21.                             <td>@myJob.date</td>  
  22.                             <td>@myJob.so_no</td>  
  23.                             <td>@myJob.serial</td>  
  24.                             <td>@myJob.status</td>  
  25.                             <td>@myJob.technician</td>  
  26.                         </tr>  
  27.                     }  
  28.                 </table> 
 And for my script:
I'm  trying to print a simple alert if my function is working. But it doesn't.
  1. function asign_to() {  
  2.     var table = document.getElementById("myJobTable");  
  3.     var value_check = "";  
  4.     for (var i = 0; i < table.rows.length; i++) {  
  5.         if ($('#chk')[i].is(':checked')) {  
  6.             alert('You clicked me!');  
  7.         }  
  8.     }  

 Got this error:
  1.   TypeError: $(...)[i].is is not a function
Answers (2)
0
Satyapriya Nayak

Satyapriya Nayak

NA 53k 8m 13y
Hi Arjun,

Oracle Spatial (formerly called SDO and before that MultiDimension), provides a way to store and retrieve multi-dimensional data in Oracle. It is primarily used for Geographical Information Systems to implement geo-reference and solve queries such as how is something related to a specific location.



Oracle Locator is free with the Oracle Database Server (EE and Standard Edition). Oracle Spatial is intended for "heavy" spatial applications. It only ships with Oracle Enterprise Edition and are separately charged.


Please refer the below links

http://www.orafaq.com/wiki/Spatial_FAQ

http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks/55/oracle-locator-vs-enterprise-licensing-the-sdogeom-package

http://docs.oracle.com/html/A88805_01/sdo_intr.htm


Thanks