• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
enable/disable submit button based on my row table value

#3
You should do this by finding this button by id or class or if this is only one submit button on page by selector $('input[type=submit]');
Im not exactly know how your code should work with this customerId but i think you want to disable button when customerId gonna be empty?

Code:
$('#mytable tr').each(function()
{
  if (!this.rowIndex) return; // skip first row
  var customerId = this.cells[3].innerHTML;
  if(customerId == ''){  // Im understand that innerHTML return text value
     $('#mysubmitbtn').prop('disabled', true);
   }
});
Reply


Messages In This Thread
RE: enable/disable submit button based on my row table value - by Piotr - 10-05-2018, 04:45 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.