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; } Quote 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) Quote Link to comment https://forums.phpfreaks.com/topic/234882-remove-child-wont-work/#findComment-1207047 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.