Disabling the last "delete portal row" button
I have a DB with many portals and in virtually all of them I have created a "delete portal row" button, that appears on each row. The last row, which is always the empty one, includes this button as well, and if users click on it, they still get a message asking for confirmation of deletion of the empty (essentially non-existent) row.
Is there any way to make this button unclickable (or not performing the delete script) only for this row to avoid this confusion?
And another relevant question : if a user clicks the delete portal row button and then chooses "Cancel" in the message box asking for confirmation, this is followed by another message "Delete portal row has been cancelled. Do you wish to continue with the script?" . Is there any way to prevent this second message from appearing after hitting cancel?