A: 

Two suggestions.

  1. Move your onclick="GoToURL(this)" event handler to the form's onsubmit handler.
  2. Change your button type to type="submit".
Andy E
You also might want to put the `onsubmit` out of your HTML, inside `window.onload`.
Marcel Korpel