I have a modal window and I need to pop an alert box when user deletes a certain item on the screen as, "Are you sure you want to delete?". There is no way that I can remove this modal window. Is there a better way of displaying that alert message?
Instead of displaying such alert messages it is a good practice to provide an undo feature (see https://goodui.org/home.php#8).
Imagine that you just pressed an action button or link. Undos respect the initial human intent by allowing the action to happen smoothly first and foremost. Prompts on the other hand suggest to the user that he or she does not know what they are doing by questioning their intent at all times.