Welcome Guest, Not a member yet? Register   Sign In
how to disable submit button when value is not null
#1

I am using table row to display records
Code:
echo '<tr>';                    
                   echo '<td align="center">'.$sno++.'</td>';
                   echo '<td>'.$row['doctype'].'</td>';
--Upload button --
 echo '<td>'.$row['status'].'</td>';

once images uploaded the status changed into 1.
if this all $row['status'] is null then disable submit button else 
enable.
need suggestion
Reply
#2

You know were getting tried of answering the same questions over and over!

Use Google search instead of expecting us to do your coding for you.

Button disabled Property

Or use jQuery toggle
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

You can need to use any validator library, for example, => http://1000hz.github.io/bootstrap-validator/

Give all validation functionality by default and also possible with customization as per you need
Reply
#4

(10-24-2018, 08:43 AM)InsiteFX Wrote: You know were getting tried of answering the same questions over and over!

Use Google search instead of expecting us to do your coding for you.

Button disabled Property

Or use jQuery toggle

Those values are not input type element. readonly values . how?
Reply
#5

Code:
// jQuery
// Disabling a html button
$('#Button').prop('disabled', true);

// Enabling a html button
$('#Button').prop('disabled', false);
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

(11-09-2018, 04:37 AM)InsiteFX Wrote:
Code:
// jQuery
// Disabling a html button
$('#Button').prop('disabled', true);

// Enabling a html button
$('#Button').prop('disabled', false);

Code:
$('#mytable tr').each(function() {
   if (!this.rowIndex) return; // skip first row
   var customerId = this.cells[2].innerHTML;
   alert(customerId);
   if(customerId != 'Uploaded'){  // Im understand that innerHTML return text value
    $('#next').prop('disabled', true);
  }
   
});
My table display 5 rows . if 5 rows should be return as uploaded then next button will be enabled else disabled. need suggestion
Reply




Theme © iAndrew 2016 - Forum software by © MyBB