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);
});
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);
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
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-...
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....
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-...