I am trying to integrate a promo section into my website. Basically, I want people to be able to enter a promo code into a form, and if the promo code is valid, be redirected to a different section of the site. It doesn't need to be particularly secure, and all the promo codes are the same. Here is the code I am using: if ( document.form1.password.value == "xxxxx" ) { open('localpage','_self'); } else { alert("Your promo code is incorrect. Please register."); } This works, but only if you substitute _blank for _self, which spawns a new browser. I want to keep the same browser window. Any ideas on how to keep this in the same window?