Reputation: 2634
I have an html table with an Edit button. Clicking "Edit" builds a form with javascript. I'm using jquery to hide the row with "Edit". Now I'm trying to get the Cancel button to work with this. Where if you click "Cancel" it puts the row in the table back (which is easy) but it also hides the form.
I'm not sure how to hide the form. I've create an jsfiddle which has all the details: http://jsfiddle.net/h34Hr/13/
Press "Edit" on any row then press "Cancel" in the form. It does bring the row back but I'm not sure how to hide the form.
Any help is appreciated.
Upvotes: 0
Views: 56
Reputation: 24334
You should utilise JQuery a bit more.
To fix your issue try changing this
myCancel.onclick = function() {
thisrow.show();
};
to this
myCancel.onclick = function() {
thisrow.show();
$('#editform').hide();
};
Upvotes: 1