You must show the full code. For example, this bad code
<a href="javascript:window.open()">Click</a>
will show [OBJECT] when pressed.
If your script is just
<script> window.location='someurl'; </script>
then something else happens - I just checked it in Safari on my Mac
<script> window.location='http://www.google.com' </script>
source share