An onclick function is supposed to fire up a new window with a string and the textbox value appended to the url, but it doesn't seem to work. (The string will populate another textbox in the new window. This however, functions properly.)
When I use window.location it works but I don't want the page to open in the same window.
I'm very new to Javascript, thank you for your help.
Javascript
function changeLocation(){
var textboxpw = document.getElementById("key");
window.open{'http://website.com?secret="+textboxpw.value), '_blank';}
HTML
<input type="text" name="key" id="key" />
<input type="submit" value="Go" onclick="changeLocation(); return false;" />