Open Url in a custom button

Open Url in a custom button

Why is it that the  open url in a custom button cant seem to work with the "Same window" parameter. it always open a new window.

am i doing something wrong here..

url=" https://crm.zoho.com/crm/EditEntity.do?module=CustomModule1&id=" + currentid;
openUrl(url,"Same window",);