I am trying to make a button that will popup a new window using a javascript button pressed by the user. The button shows up on the site, but nothing happens when I press it. I've tried it in Chrome and Firefox. I can't figure out if it's browser settings or code error.
<button onclick="window()">Reminisce</button>
<script type="text/javascript">
function window() {
var w = window.innerWidth;
var h = window.innerHeight;
var rw = Math.random()*w)+1);
var rh = Math.random()*h)+1);
var popup = window.open('http://www.roberthayeskee.com/bush2.html,'_blank','width=rw,height=rh');
}
</script>
Thanks!
rw,rh, andpopup. Other than that, you should rename the function to something other than "window."