Delete open window and change it with href