Well that all makes very logical sense. I've followed everything and double checked it. Unfortunately, the delete button now does nothing. I reverted the page and it works fine with the obvious lack of deleting the proper file as said before. I suspected something with the "onclick" in the delete button but I'm not seeing why it should break the function, as I don't see any syntax issues and error reporting is showing nothing.
I've attached the revised page.