1 of 2 people found this helpful
window.open open new window in external web browser (IE on Windows), so I got many alert before the job done.
window.location.href change URL of web viewer, so it worked like "set web viewer". This is preferable for using fmp: URL.
But your comment doesn't really address the 'why' one of them works better (or not). And the "window.open()" command seems to work just great when used from a hosted version of this file, it was just failing when trying to run it as a local file.