last day (15 days later) » 

4:11 PM
0
A: jQuery update doesnt work

user1480088Your problem might be in this jquery statement { headmark : $($row[HEAD_MARK]).val(), headmark_id : $($row[ID]).val() } can you please explain which value you are trying to get from HTML dom tree using jquery. since you have to either use # if field from which you want get value using ...

 
SO i want to get the value from oci_fetch_assoc() loop that generated as $row[HEAD_MARK] and $[ID]. Both are the column name. and the screen shot of the result is postimg.org/image/tewkyx1fn
its not identified by id tho ...
 
please post you entire PHP and jquery code only after then i can help you. as well as php script you called in ajax call.
sorry just tell me first from which html element you want to get value in jquery for headmark and headmark_id variables.
 
here is the first page, pastebin.com/MX69V5UW and the process_class.php, pastebin.com/Vtz1iREM
im getting the value from the php tag
 
@Chriskonz so have you tried edited code?
 
i tried but it doesnt work
 
4:11 PM
does jquery able to get value from check-box data attributes? put alert( $(this).data('headmark') + ' ' + $(this).data('id') ); at first line in change function and check if change function is called or not.
 
no... it doesnt do anything
so i tried to do this with the id stuff
$('.cuttingCheckbox').change(function() {
if (this.checked) {
$.post('process_class.php',{
headmark : $(this).data('headmark'),
headmark_id : $(this).data('id')
}, function(response){
this.setAttribute("disabled", true), alert(headmark,headmark_id);
});
}
});
thats for the jQuery
and this is for the markup
 if ($row['CUTTING'] == 'Y'){
                                              //echo "<td><input type='checkbox' id='cuttingCheckbox'  name='cuttingCheckbox' checked='checked' disabled='disabled'/></td>";
                                              echo "<td><img src='../images/fabDone.png' width='30' height='30'></td>";
                                          } else {
                                              echo "<td><input type='checkbox' data-headmark=".$row['HEAD_MARK']." data-id=".$row['ID']." class='cuttingCheckbox'  name='cuttingCheckbox'/></td>";
and this is for the sql
$cuttingUpdateParse = oci_parse($conn,"UPDATE FABRICATION_QC SET CUTTING = 'Y'
WHERE HEAD_MARK = ".$_POST["headmark"]." AND ID = ".$_POST["headmark_id"].";");
so it doesnt do anything including disabling the button
 

  last day (15 days later) »