unemployment Posted April 27, 2011 Share Posted April 27, 2011 I can't get the remove child working. Any ideas? input1[i].onclick = function() { // alert(this.name); ajax.get('/assets/ajax/partner_accept.php?uid=' + this.name, function(responce) { input1[i].parentNode.removeChild(this); }); return false; } input2[i].onclick = function() { // alert(this.name); ajax.get('/assets/ajax/partner_deny.php?uid=' + this.name, function(responce) { }); return false; } Link to comment https://forums.phpfreaks.com/topic/234882-remove-child-wont-work/ Share on other sites More sharing options...
KevinM1 Posted April 27, 2011 Share Posted April 27, 2011 input1 means nothing within the context of that function. Use this.parentNode.removeChild(this) Link to comment https://forums.phpfreaks.com/topic/234882-remove-child-wont-work/#findComment-1207047 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.