The difference between hostname and origin is that origin have the protocol (http:) at first, hostname has not.
When you link it to another site without the protocol it appends the url at the end of the same url.
So you get someurl.com/someurl.com
The problem with origin is that you also get the TCP port (eg :6000).
This I did not want since I wanted to link to another site with another port.
Also when using a button to trigger the linking in the template node, remember to do an if check (like a string sent from the button) in the script before sending the user to another side. Before window.open(some site)