var index = parent.layer.getFrameIndex(window.name); parent.location.reload(); parent.layer.close(index);