i think that this will maybe work, when i tested it the link it displayed the localsite in the IE status but upon clicking the link you are directed to google.
function set_link(id, linkID)
a = "http://www.google.com";
document.getElementById(linkID).href = a;
<a id='linkID1' onClick="set_link('1', 'linkID1')" href='' target="_blank">Google</a>
I hope this works for you.