JavaScript How to disable a input box using Id while add a new row in the table using clone method? disable input using css,disable input using jquery,disable input

I have a javascript function and HTML form which contains a table that has an id of Phone and there is a javascript function to add and delete rows.

My problem is while create a new row by add method I want the table data input field (id="Employee_ID") I want to disable. Is it possible can someone help me.

$("input.add").live('click', function() {
    var $tr = $(this).closest('tr');
    var $clone = $tr.clone();
    $clone.find(':text').val('');
    $clone.find("select").val('');
    $clone.find("a").removeAttr("href");
    $clone.find("label").val('');
    $clone.find(':checkbox:checked').prop('checked', false).val('N');
    $clone.find("#Employee_ID").prop("disable", true);
    $tr.after($clone);
});
Answer:1

First thing I want to say better to find the element with class name and disable it!! and when you clone it try to give a different Id for cloned element as IDs in DOM should be unique. Try to use attr instead of prop and finally it should have been disabled instead of disable.

$clone.find("#Employee_IDClass").attr("disabled", true);
Answer:2

I have the following list and I need to disable the radio button with a specific value how can I do that using JQuery

I have the following list and I need to disable the radio button with a specific value how can I do that using JQuery

  1. select input inside div jquery
  2. select input inside td jquery
  3. select input inside div css
  4. select input inside form jquery
  5. select input inside div
  6. select input inside class
  7. select input inside td
  8. select input inside iframe
  9. select input inside li
  10. select inside input
  11. select inside input bootstrap
  12. select inside input html
  13. jquery select input inside class
  14. css select input inside class
  15. javascript select input inside div
  16. select all input inside div jquery
  17. jquery select input inside this
  18. jquery select input inside id
  19. jquery select input inside table
  20. jquery select input inside tr

i Write This code for that $(document).on('keydown','form input :nth-last-child(3)',function(e){ var keyCode = e.keyCode || e.which; if (keyCode == 9) { var $parent=$('form').parents('.ui-...

i Write This code for that $(document).on('keydown','form input :nth-last-child(3)',function(e){ var keyCode = e.keyCode || e.which; if (keyCode == 9) { var $parent=$('form').parents('.ui-...

  1. can't switch to another instagram account
  2. another camera broken can't switch
  3. can i switch to another doctor in the same clinic
  4. can i switch to another antibiotic
  5. can't switch to another branch git
  6. can i switch to another water supplier
  7. can you switch to another branch
  8. can you switch another phone
  9. can not switch to another branch

I have a list of list items which are display: none by default. I programmatically change a certain number of them to list-items. I've been trying to use querySelectorAll but when I try: document....

I have a list of list items which are display: none by default. I programmatically change a certain number of them to list-items. I've been trying to use querySelectorAll but when I try: document....

  1. count number of rows displayed in excel

To prevent clickjacking from happenning for your website, I have noticed several different methods. Some use javascript to have your website break out of iframe, the other soltution is to set the X-...

To prevent clickjacking from happenning for your website, I have noticed several different methods. Some use javascript to have your website break out of iframe, the other soltution is to set the X-...