Is there an easy way to modify this code so that the target URL opens in the SAME window?
<a href='javascript:q=(document.location.href);void(open('http://example.com/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));'>click here</a>``
The second parameter of window.open() is a string representing the name of the target window.
Set it to: ‘_self’.
Sidenote: The following question gives an overview of an arguably better way to bind event handlers to HTML links.
What’s the best way to replace links with js functions?