Switched getURL from document.open to window.open

Switched getURL from document.open to window.open, also changed default target to '_self' to avoid pop-up blocking.